about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt/macro_rules.rs
AgeCommit message (Collapse)AuthorLines
2014-02-14Refactored ast_map and friends, mainly to have Paths without storing them.Eduard Burtescu-6/+4
2014-02-07Removed @self and @Trait.Eduard Burtescu-7/+7
2014-02-02libsyntax: De-`@str` `MacroDef`Patrick Walton-2/+2
2014-02-02librustc: Fix merge fallout.Patrick Walton-3/+5
2014-01-25Simplify and rename macro APISteven Fackler-8/+6
Now that procedural macros can be implemented outside of the compiler, it's more important to have a reasonable API to work with. Here are the basic changes: * Rename SyntaxExpanderTTTrait to MacroExpander, SyntaxExpanderTT to BasicMacroExpander, etc. I think "procedural macro" is the right term for these now, right? The other option would be SynExtExpander or something like that. * Stop passing the SyntaxContext to extensions. This was only ever used by macro_rules, which doesn't even use it anymore. I can't think of a context in which an external extension would need it, and removal allows the API to be significantly simpler - no more SyntaxExpanderTTItemExpanderWithoutContext wrappers to worry about.
2014-01-21Remove unnecessary parentheses.Huon Wilson-1/+1
2014-01-13librustc: Remove `@` pointer patterns from the languagePatrick Walton-8/+8
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-37/+36
2014-01-05Use ~-objects instead of @-objects for syntax extsSteven Fackler-2/+2
This is necessary for #11151 to make sure dtors run before the libraries are unloaded.
2014-01-03libsyntax: De-`@mut` `StringReader`, `TtReader`, and `reader`Patrick Walton-10/+3
2014-01-02libsyntax: De-`@mut` `Parser::span`Patrick Walton-1/+1
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-2/+2
2014-01-02libsyntax: Make the parser mutablePatrick Walton-16/+28
2014-01-01syntax::codemap: Add static DUMMY_SPklutzy-3/+3
It replaces `dummy_sp()`.
2013-12-29Start passing around &mut ExtCtxtSteven Fackler-2/+2
2013-12-28Stop using @ExtCtxtSteven Fackler-3/+3
2013-11-27Freeze the AST by removing a couple of unused @mut ~[T] from token_tree.Eduard Burtescu-1/+1
2013-11-26Support multiple item macrosSteven Fackler-3/+10
Closes #4375
2013-10-10syntax: allow macros to expand to items with attributes.Huon Wilson-2/+5
Fixes #4471.
2013-10-02syntax: indicate an error when a macro ignores trailing tokens.Huon Wilson-4/+29
That is, only a single expression or item gets parsed, so if there are any extra tokens (e.g. the start of another item/expression) the user should be told, rather than silently dropping them. An example: macro_rules! foo { () => { println("hi"); println("bye); } } would expand to just `println("hi")`, which is almost certainly not what the programmer wanted. Fixes #8012.
2013-10-02syntax: remove some dead code.Huon Wilson-73/+0
2013-09-26Update the compiler to not use printf/printflnAlex Crichton-2/+2
2013-09-23libsyntax: Remove some more `@fn`s from the macro expanderPatrick Walton-16/+125
2013-09-06WIP: adding mark-cancelling for macro_rulesJohn Clements-1/+4
2013-09-06whitespace, reindentation, and comments onlyJohn Clements-1/+0
2013-09-06capturing macros now implementedJohn Clements-2/+2
2013-09-06comments onlyJohn Clements-0/+6
2013-09-06removed unneccessary SyntaxExpander structsJohn Clements-1/+1
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-3/+3
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-5/+5
2013-08-11libsyntax: Update from `@Object` to `@mut Object` as requiredNiko Matsakis-3/+3
2013-08-03remove obsolete `foreach` keywordDaniel Micay-1/+1
this has been replaced by `for`
2013-08-01migrate many `for` loops to `foreach`Daniel Micay-1/+1
2013-07-24Change 'print(fmt!(...))' to printf!/printfln! in src/lib*Birunthan Mohanathas-7/+5
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-1/+1
bootstrapping on Windows.
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-5/+8
2013-07-17librustc: Add a lint mode for unnecessary `copy` and remove a bunch of them.Patrick Walton-2/+3
2013-07-12Remove the global 'vec::to_owned' functionAlex Crichton-3/+2
2013-07-07De-share trait_refJames Miller-1/+1
Also, makes the pretty-printer use & instead of @ as much as possible, which will help with later changes, though in the interim has produced some... interesting constructs.
2013-06-25great renaming propagation: syntaxCorey Richardson-4/+2
2013-06-21vec: rm old_iter implementations, except BaseIterDaniel Micay-1/+1
The removed test for issue #2611 is well covered by the `std::iterator` module itself. This adds the `count` method to `IteratorUtil` to replace `EqIter`.
2013-06-13Revert "std: convert {vec,str}::to_owned to methods."Brian Anderson-2/+3
This fixes the strange random crashes in compile-fail tests. This reverts commit 96cd61ad034cc9e88ab6a7845c3480dbc1ea62f3. Conflicts: src/librustc/driver/driver.rs src/libstd/str.rs src/libsyntax/ext/quote.rs
2013-06-13Use @str instead of @~str in libsyntax and librustc. Fixes #5048.Huon Wilson-1/+1
This almost removes the StringRef wrapper, since all strings are Equiv-alent now. Removes a lot of `/* bad */ copy *`'s, and converts several things to be &'static str (the lint table and the intrinsics table). There are many instances of .to_managed(), unfortunately.
2013-06-12std: unify the str -> [u8] functions as 3 methods: .as_bytes() and ↵Huon Wilson-1/+0
.as_bytes_with_null[_consume](). The first acts on &str and is not nul-terminated, the last two act on strings that are always null terminated (&'static str, ~str and @str).
2013-06-12std: convert {vec,str}::to_owned to methods.Huon Wilson-2/+2
2013-06-05removed unused imports (and one unused argument)John Clements-1/+0
2013-06-05remove interner from tt_readerJohn Clements-3/+2
2013-06-05token_to_ident takes argument by referenceJohn Clements-1/+1
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-4/+4
2013-06-05just use TLS internerJohn Clements-7/+7