summary refs log tree commit diff
path: root/src/libsyntax/ext
AgeCommit message (Collapse)AuthorLines
2014-07-04comments onlyJohn Clements-3/+2
2014-07-04hygiene for item fn argsJohn Clements-7/+49
also, introduce fn_decl_arg_bindings and expand_and_rename abstractions
2014-07-04comments & test cases for IdentRenamersJohn Clements-11/+63
2014-07-04use PatIdentRenamer for match bindingsJohn Clements-10/+5
2014-07-04comments onlyJohn Clements-3/+3
2014-07-04new_mark -> apply_mark, new_rename -> apply_renameJohn Clements-28/+28
2014-07-04add PatIdentRenamerJohn Clements-6/+37
2014-07-04move RenameList to mtwt, add new_renames abstractionJohn Clements-23/+40
2014-07-04comments, whitespace, rename NameFinderContext to PatIdentFinderJohn Clements-19/+15
2014-07-03simplify and uncomment item-fn-arg hygiene unit testJohn Clements-9/+6
2014-07-03Simplify creating a parser from a token treePiotr Jawniak-31/+11
Closes #15306
2014-07-03Fix spelling errors.Joseph Crail-3/+3
2014-07-03Simplify PatIdent to contain an Ident rather than a PathJohn Clements-34/+12
Rationale: for what appear to be historical reasons only, the PatIdent contains a Path rather than an Ident. This means that there are many places in the code where an ident is artificially promoted to a path, and---much more problematically--- a bunch of elements from a path are simply thrown away, which seems like an invitation to some really nasty bugs. This commit replaces the Path in a PatIdent with a SpannedIdent, which just contains an ident and a span.
2014-06-29Implement RFC#28: Add PartialOrd::partial_cmpSteven Fackler-5/+99
I ended up altering the semantics of Json's PartialOrd implementation. It used to be the case that Null < Null, but I can't think of any reason for an ordering other than the default one so I just switched it over to using the derived implementation. This also fixes broken `PartialOrd` implementations for `Vec` and `TreeMap`. RFC: 0028-partial-cmp
2014-06-28auto merge of #15233 : jbclements/rust/match-var-hygiene-etc, r=cmrbors-98/+137
This PR includes two big things and a bunch of little ones. 1) It enables hygiene for variables bound by 'match' expressions. 2) It fixes a bug discovered indirectly (#15221), wherein fold traversal failed to visit nonterminal nodes. 3) It fixes a small bug in the macro tutorial. It also adds tests for the first two, and makes a bunch of small comment improvements and cleanup.
2014-06-27comments onlyJohn Clements-1/+2
2014-06-27adjust fold to fold over interpolated items/exprs/etc.John Clements-2/+2
Closes #15221
2014-06-27added unit and standalone test for 15221, extra debugging outputJohn Clements-5/+26
2014-06-27undo helpful attempt to spell-checkJohn Clements-1/+1
Yes, that word is spelled \'memoization\'
2014-06-27remove trailing whitespaceJohn Clements-1/+1
2014-06-27hygiene for match-bound vars now implementedJohn Clements-24/+33
Closes #9384
2014-06-27improve match test case to include guardJohn Clements-4/+4
2014-06-27remove unnecessary abstractionJohn Clements-10/+5
2014-06-27cleanup and shiny new more-functional interfaceJohn Clements-55/+36
2014-06-27WIP match hygiene, compilesJohn Clements-12/+12
2014-06-27get rid of needless wrapper functionJohn Clements-14/+8
2014-06-27working on hygieneJohn Clements-12/+50
2014-06-26Remove unnecessary to_string callsPiotr Jawniak-1/+1
This commit removes superfluous to_string calls from various places
2014-06-25don't expand subexprs of for loop, just re-expand whole thing.John Clements-5/+6
Fixes #15167
2014-06-25remove misleading and unnecessary underscoresJohn Clements-2/+3
2014-06-25remove unneccessary pubs, shorten namesJohn Clements-9/+9
2014-06-25remove unneeded visit_ty methodsJohn Clements-9/+0
2014-06-25add unit test for match var hygieneJohn Clements-0/+12
2014-06-25enrich and rename crate_idents test caseJohn Clements-6/+12
2014-06-25comments onlyJohn Clements-4/+9
2014-06-25revive old commented-out test cases as ignored test cases for hygieneJohn Clements-6/+58
2014-06-25auto merge of #15160 : alexcrichton/rust/remove-f128, r=brsonbors-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-24Allow splicing more things in quotesKeegan McAllister-0/+16
2014-06-24Use macros to implement syntax::ext::quote::ToSourceKeegan McAllister-125/+74
This code deserves a bigger refactor, but here's a local improvement.
2014-06-24Remove the quad_precision_float feature gateAlex Crichton-1/+0
The f128 type has very little support in the compiler and the feature is basically unusable today. Supporting half-baked features in the compiler can be detrimental to the long-term development of the compiler, and hence this feature is being removed.
2014-06-23Allow trailing comma in `concat!`Stepan Koltsov-2/+5
(And in other extensions implemented with `get_exprs_from_tts` function).
2014-06-18Revert bytes!() docstring change, and fix a typo.Simon Sapin-1/+1
2014-06-18Deprecate the bytes!() macro.Simon Sapin-0/+8
Replace its usage with byte string literals, except in `bytes!()` tests. Also add a new snapshot, to be able to use the new b"foo" syntax. The src/etc/2014-06-rewrite-bytes-macros.py script automatically rewrites `bytes!()` invocations into byte string literals. Pass it filenames as arguments to generate a diff that you can inspect, or `--apply` followed by filenames to apply the changes in place. Diffs can be piped into `tip` or `pygmentize -l diff` for coloring.
2014-06-18auto merge of #14880 : SimonSapin/rust/byte-literals, r=alexcrichtonbors-0/+7
See #14646 (tracking issue) and rust-lang/rfcs#69. This does not close the tracking issue, as the `bytes!()` macro still needs to be removed. It will be later, after a snapshot is made with the changes in this PR, so that the new syntax can be used when bootstrapping the compiler.
2014-06-17Add a b'x' byte literal of type u8.Simon Sapin-0/+7
2014-06-17librustc: Make addresses of immutable statics insignificant unlessPatrick Walton-9/+1
`#[inline(never)]` is used. Closes #8958. This can break some code that relied on the addresses of statics being distinct; add `#[inline(never)]` to the affected statics. [breaking-change]
2014-06-16rustc: Improve span for error about using a method as a field.Kevin Butler-2/+10
libsyntax: ExprField now contains a SpannedIdent rather than Ident. [breaking-change]
2014-06-15Register new snapshotsAlex Crichton-25/+2
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-6/+11
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-14Register new snapshotsAlex Crichton-10/+0