about summary refs log tree commit diff
path: root/src/comp/syntax
AgeCommit message (Collapse)AuthorLines
2011-07-11The lexer's get_mark_str should slice by byte position, not char. Closes #654Brian Anderson-3/+4
2011-07-11Fix pretty-printing of record patternsMarijn Haverbeke-3/+3
2011-07-11Implement record patternsMarijn Haverbeke-0/+74
Closes #469.
2011-07-11Move visit to newtype-style nominal typeMarijn Haverbeke-112/+110
This makes getting the function fields out of the visitor less cumbersome and more efficient (no take/drop).
2011-07-11Implement or-patterns in case clausesMarijn Haverbeke-18/+53
You can now say expr_move(?dst, ?src) | expr_assign(?dst, ?src) { ... } to match both expr_move and expr_assign. The names, types, and number of bound names have to match in all the patterns. Closes #449.
2011-07-10Add a missing case so nbody.rs can ppJesse Ruderman-0/+1
2011-07-10Export noop_fold_expr so the fuzzer can use itJesse Ruderman-0/+1
2011-07-10Make #fmt work from inside std. Issue #175Brian Anderson-10/+25
At long last, this patch makes #fmt usable from inside the standard library. The way it does it us very hackish, but at least it works now.
2011-07-09Track the path as we fold over the AST looking for unit tests. Issue #428Brian Anderson-1/+4
2011-07-08Alias-ify some prettyprinting functionsTim Chevalier-3/+4
2011-07-08Nicer pretty-printing for anon objs. Closes #499.Lindsey Kuper-3/+50
(Incidentally, what's the right way to test changes to the pretty-printer? There has to be a better way than what I did, which was to log_err the results of expr_to_str as exprs passed through trans and glance at the output.)
2011-07-07rustc: Remove all exterior vectors from the ASTPatrick Walton-46/+43
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-164/+171
2011-07-06rustc: Make constraint args in the AST interior vectorsPatrick Walton-3/+4
2011-07-06rustc: Move AST constraints to interior vectorsPatrick Walton-16/+17
2011-07-06rustc: Migrate core AST types to interior vectorsPatrick Walton-12/+32
2011-07-06rustc: Make AST tuple types use interior vectorsPatrick Walton-4/+4
2011-07-06rustc: Make meta items into interior vectorsPatrick Walton-15/+43
2011-07-06rustc: Move crate directives over to interior vectorsPatrick Walton-13/+12
2011-07-06rustc: Convert attribute in the AST to interior vectorsPatrick Walton-61/+57
2011-07-06rustc: Make AST paths use interior vectorsPatrick Walton-29/+57
2011-07-06Begin adding unit testing infrastructure to the compilerBrian Anderson-0/+1
Add a --test flag and a pass for transforming the AST to generate a test harness. Issue #428
2011-07-06rustc: Move the interner over to interior vectorsPatrick Walton-6/+6
2011-07-06rustc: Make the various constraint-related types in middle::ty use interior ↵Patrick Walton-2/+7
vectors
2011-07-06Simplify AST for expr_anon_obj.Lindsey Kuper-9/+8
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-177/+121
2011-07-06Temp commit on the way to making meta_item into an interior vectorPatrick Walton-15/+43
2011-07-06rustc: Move crate directives over to interior vectorsPatrick Walton-13/+12
2011-07-06rustc: Convert attribute in the AST to interior vectorsPatrick Walton-61/+57
2011-07-06rustc: Make AST paths use interior vectorsPatrick Walton-29/+57
2011-07-06rustc: Move the interner over to interior vectorsPatrick Walton-6/+6
2011-07-06rustc: Make the various constraint-related types in middle::ty use interior ↵Patrick Walton-2/+7
vectors
2011-07-06Support paren-free and lightweight-case syntaxMarijn Haverbeke-21/+10
(The old syntax is still supported as well, for now.) It is now possible to leave out the parens around if, while, and do/while conditions, and around alt expressions. Cases in an alt block can now leave off the case keyword and parens around the pattern. After the next snapshot, we can start migrating our code to use the new alt syntax, probably with a pretty-printer pass. The paren-free syntax will remain optional (you may always parenthesize expressions), but the old case syntax will no longer be supported in the future.
2011-07-06Remove temporary stdlib placeholders, use actual stdlib functionsMarijn Haverbeke-38/+7
(Possible now that a snapshot took place.)
2011-07-05Change ast::meta_name_value to accept any literal, not just stringBrian Anderson-13/+5
This isn't useful for much of anything yet, since metadata::encoder doesn't know how to handle the non-string variants. Issue #611
2011-07-05Print remaining comments at end of *crate*, not module.Graydon Hoare-1/+1
2011-07-05Remove unused eval function. Issue #604Brian Anderson-17/+0
2011-07-05Parse attributes for native items. Closes #609Brian Anderson-10/+36
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-0/+8642
src/comp/syntax is currently just a sub-module of rustc, but it will, in the near future, be its own crate. This includes: - The AST data structure - The parser - The pretty-printer - Visit, walk, and fold - The syntax extension system - Some utility stuff that should be in the stdlib* *) Stdlib extensions currently require a snapshot before they can be used, and the win build is very broken right now. This is temporary and will be cleaned up when one of those problems goes away. A lot of code was moved by this patch, mostly towards a more organized layout. Some package paths did get longer, and I guess the new layout will take some getting used to. Sorry about that! Please try not to re-introduce any dependencies in syntax/ on any of the other src/comp/ subdirs.