about summary refs log tree commit diff
path: root/src/libsyntax/ext/tt
AgeCommit message (Collapse)AuthorLines
2018-04-05No separator for `?`. No `?` as a separator.Mark Mansi-67/+22
2018-03-22Clean up raw identifier handling when recovering tokens from AST.Lymia Aluysia-1/+1
2018-03-18Return a is_raw parameter from Token::ident rather than having separate methods.Lymia Aluysia-4/+4
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-14/+15
2018-03-17Reject `_` in `ident` matcherVadim Petrochenkov-17/+19
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-2/+1
2018-03-16Auto merge of #48524 - abonander:check-macro-stability, r=petrochenkovbors-1/+12
check stability of macro invocations I haven't implemented tests yet but this should be a pretty solid prototype. I think as-implemented it will also stability-check macro invocations in the same crate, dunno if we want that or not. I don't know if we want this to go through `rustc::middle::stability` or not, considering the information there wouldn't be available at the time of macro expansion (even for external crates, right?). r? @nrc closes #34079 cc @petrochenkov @durka @jseyfried #38356
2018-03-07check stability of macro invocationsAustin Bonander-1/+12
2018-03-05Turn features() into a query.Michael Woerister-17/+15
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-11/+13
2018-01-30Update a few commentsMark Mansi-1/+4
2018-01-30Fix trailing whitespaceMark Mansi-1/+1
2018-01-30Improved tests + typo fixes + assertMark Mansi-0/+2
2018-01-30Add feature gate + testsMark Mansi-10/+68
2018-01-30Fix typo in error message + update testsMark Mansi-1/+1
2018-01-30Attempted fix for `?` kleene opMark Mansi-23/+21
2018-01-30Run rustfmt on macro_parser.rsMark Mansi-4/+6
2018-01-30Run rustfmt on quoted.rsMark Mansi-10/+21
2018-01-30Update the macro parser to allow at most once repetitions for `?` KleeneMark Mansi-16/+22
2018-01-30Allow `?` as a KleeneOp in the macro parserMark Mansi-46/+84
2018-01-30Rollup merge of #47732 - mark-i-m:markim_comments_0001, r=jseyfriedkennytm-126/+351
Run rustfmt and add doc comments to libsyntax/ext/tt/macro_parser.rs Similar to #47603 cc @theotherphil since you reviewed my other PR :smile: And because they are already assigned on #47603: r? @arielb1
2018-01-30Rollup merge of #47603 - mark-i-m:markim_comments_0000, r=jseyfriedkennytm-39/+173
Run rustfmt and add doc comments to libsyntax/ext/tt/quoted.rs I was already going to try to understand this code to try to implement rust-lang/rfcs#2298. I figured I would put that knowledge into comments and share... This PR contains _no changes_ to the code itself -- just formatting and comments. I'm not sure what the best way to do this is. I plan to make more such PR for other files, but I figured it would have fewer conflicts if I do it file by file...
2018-01-29fix typosMark Mansi-4/+4
2018-01-29Update commentMark Mansi-1/+2
2018-01-26A few more commentsMark Mansi-0/+8
2018-01-26Still more commentsMark Mansi-2/+26
2018-01-26Added/improved commentsMark Mansi-17/+61
2018-01-26Added lots of comments + minor reorganizationMark Mansi-34/+94
2018-01-26Added a bunch of comments to macro_parser.rsMark Mansi-10/+62
2018-01-26Run rustfmt on /libsyntax/ext/tt/macro_parser.rsMark Mansi-78/+114
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-5/+5
errors
2018-01-21Fix typosMark Mansi-3/+3
2018-01-19Add a bunch of doc commentsMark Mansi-3/+72
2018-01-19Run rustfmt and add commentsMark Mansi-38/+103
2017-12-28CleanupMatt Peterson-4/+4
2017-12-28Add feature gate macro_lifetime_matcherMatt Peterson-1/+13
2017-12-28replace parse_lifetime with expect_lifetimeMichael Hewson-1/+1
made `parser::Parser::expect_lifetime` public, so it can be called from `macro_parser::parse_nt`
2017-12-28Resurrecting #33135Michael Hewson-7/+9
Started rebasing @sgrif's PR #33135 off of current master. (Well, actually merging it into a new branch based off current master.) The following files still need to be fixed or at least reviewed: - `src/libsyntax/ext/tt/macro_parser.rs`: calls `Parser::parse_lifetime`, which doesn't exist anymore - `src/libsyntax/parse/parser.rs`: @sgrif added an error message to `Parser::parse_lifetime`. Code has since been refactored, so I just took it out for now. - `src/libsyntax/ext/tt/transcribe.rs`: This code has been refactored bigtime. Not sure whether @sgrif's changes here are still necessary. Took it out for this commit.
2017-09-17Rollup merge of #44088 - bjorn3:better_trace_macros, r=jseyfriedTim Neumann-1/+3
Fix "new trace_macros doesn't work if there's an error during expansion" Fixes #43493
2017-09-02Dont abort on first macro errorbjorn3-1/+3
2017-08-30Make fields of `Span` privateVadim Petrochenkov-12/+13
2017-08-21Auto merge of #43540 - petrochenkov:pathrelax, r=nikomatsakisbors-3/+1
syntax: Relax path grammar TLDR: Accept the disambiguator `::` in "type" paths (`Type::<Args>`), accept the disambiguator `::` before parenthesized generic arguments (`Fn::(Args)`). The "turbofish" disambiguator `::<>` in expression paths is a necessary evil required for path parsing to be both simple and to give reasonable results. Since paths in expressions usually refer to values (but not necessarily, e.g. `Struct::<u8> { field: 0 }` is disambiguated, but refers to a type), people often consider `::<>` to be inherent to *values*, and not *expressions* and want to write disambiguated paths for values even in contexts where disambiguation is not strictly necessary, for example when a path is passed to a macro `m!(Vec::<i32>::new)`. The problem is that currently, if the disambiguator is not *required*, then it's *prohibited*. This results in confusion - see https://github.com/rust-lang/rust/issues/41740, https://internals.rust-lang.org/t/macro-path-uses-novel-syntax/5561. This PR makes the disambiguator *optional* instead of prohibited in contexts where it's not strictly required, so people can pass paths to macros in whatever form they consider natural (e.g. disambiguated form for value paths). This PR also accepts the disambiguator in paths with parenthesized arguments (`Fn::(Args)`) for consistency and to simplify testing of stuff like https://github.com/rust-lang/rust/pull/41856#issuecomment-301219194. Closes https://github.com/rust-lang/rust/issues/41740 cc @rust-lang/lang r? @nikomatsakis
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-8/+8
Like #43008 (f668999), but _much more aggressive_.
2017-08-12syntax: #[allow_internal_unsafe] bypasses the unsafe_code lint in macros.Eduard-Mihai Burtescu-3/+9
2017-08-11Issue warnings for unnecessary path disambiguatorsVadim Petrochenkov-3/+1
2017-08-01Fixed all unnecessary muts in language coreIsaac van Bakel-3/+3
2017-07-24Make the macro parser theory description more accuratePiotr Czarnecki-100/+102
2017-07-21Review commentsEsteban Küber-4/+5
2017-07-20Use the macro structure spans instead of the invocationEsteban Küber-2/+15
2017-07-15Auto merge of #43224 - jseyfried:fix_macro_idents_regression, r=nrcbors-1/+2
macros: fix regression involving identifiers in `macro_rules!` patterns. Fixes #42019. r? @nrc