about summary refs log tree commit diff
path: root/src/comp/front
AgeCommit message (Collapse)AuthorLines
2011-08-05Revert "rustc: Introduce the concept of inline to the AST"Patrick Walton-4/+4
This reverts commit 9b9170f9fe2e4701255a5bd0630c203409d8e934.
2011-08-05rustc: Introduce the concept of inline to the ASTPatrick Walton-4/+4
2011-07-27Fix damage done by the pretty-printerMarijn Haverbeke-3/+1
2011-07-27Reformat for new syntaxMarijn Haverbeke-433/+394
2011-07-25Rename the block type to be blk also. Sorry.Michael Sullivan-4/+4
2011-07-14Add a facility for ignoring tests. Issue #428Brian Anderson-8/+31
Adding the #[ignore] attribute will cause the test not to be run, though it will still show up in the list of tests.
2011-07-14The test runner's main returns unit, not int. Issue #428Brian Anderson-1/+1
The appropriate way to indicate failure from main is to fail.
2011-07-14Flag --test implies '--cfg test'. Issue #428Brian Anderson-0/+6
So certain code can be conditionally compiled only when building for testing
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-4/+4
2011-07-12rustc: Remove some useless std::vec importsPatrick Walton-1/+0
2011-07-12Simplify the code for generating tests. Issue #428Brian Anderson-17/+10
2011-07-12Log the synthesized __test module. Issue #428Brian Anderson-4/+8
2011-07-12Elide existing main function when building a test runner. Issue #428Brian Anderson-1/+24
This prevents any defined main function from colliding with the one synthesized for the test runner. This is not the best solution since it doesn't compile a function the user defined, but I don't think it's likely to be a problem in the near term.
2011-07-12rustc: Remove exterior vectors from front::attrPatrick Walton-7/+6
2011-07-11Pass command-line args to the test runner. Issue #428Brian Anderson-5/+28
This will let the test runner filter the tests it runs.
2011-07-11rustc: Implement explicit global scope resolution via leading "::"; add a ↵Patrick Walton-3/+6
test case
2011-07-09Generate code to load a crate's tests into the std test runner. Issue #428Brian Anderson-37/+218
2011-07-09Collect functions that look like unit tests. Issue #428Brian Anderson-3/+31
2011-07-09Track the path as we fold over the AST looking for unit tests. Issue #428Brian Anderson-3/+17
2011-07-07rustc: Remove all exterior vectors from the ASTPatrick Walton-9/+7
2011-07-07rustc: Change lots of AST nodes to use interior vectorsPatrick Walton-5/+5
2011-07-06Generate a main fn for test running. Issue #428Brian Anderson-17/+79
2011-07-06rustc: Make meta items into interior vectorsPatrick Walton-24/+20
2011-07-06rustc: Convert attribute in the AST to interior vectorsPatrick Walton-8/+12
2011-07-06Begin adding unit testing infrastructure to the compilerBrian Anderson-0/+44
Add a --test flag and a pass for transforming the AST to generate a test harness. Issue #428
2011-07-06rustc: Revert the conversion to interior vectors due to heap corruptionPatrick Walton-21/+21
2011-07-06Temp commit on the way to making meta_item into an interior vectorPatrick Walton-14/+10
2011-07-06rustc: Convert attribute in the AST to interior vectorsPatrick Walton-8/+12
2011-07-05Change ast::meta_name_value to accept any literal, not just stringBrian Anderson-3/+30
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-05Support conditional compilation of native items. Closes #610Brian Anderson-5/+33
2011-07-05Error if the link attribute has duplicate items. Issue #614Brian Anderson-0/+16
2011-07-05Move everything syntax-related to syntax/, break deps on rest of compilerMarijn Haverbeke-5584/+8
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.
2011-07-04Move the ids of pat AST nodes into their structMarijn Haverbeke-18/+19
Just like it was done with items and exprs. Simplifies some code.
2011-07-03Handle fail as an argument; parse fail expressions unambiguouslyTim Chevalier-9/+8
An expression like: foo(1, fail, 2) was failing to parse, because the parser was interpreting the comma as the start of an expression that was an argument to fail, rather than recognizing that the fail here has no arguments Fixed this by using can_begin_expr to determine whether the next token after a fail token suggests that this is a nullary fail or a unary fail. In addition, when translating calls, check before translating each argument that the block still isn't terminated. This has the effect that if an argument list includes fail, the back-end won't keep trying to generate code for successive arguments and trip the !*terminated assertion.
2011-07-03Add a predicate that determines whether a token can begin an expressionTim Chevalier-0/+21
2011-07-02Fix assertion failure when syntax extension name is missing.Josh Matthews-0/+3
2011-07-02Allow any string expression to be used with fail.Josh Matthews-5/+8
2011-07-01rustc: Move path_to_str to front::astPatrick Walton-0/+13
2011-07-01Add some FIXMEs for issue #607Brian Anderson-1/+4
2011-07-01Add some logging to attr when reading crate link attributesBrian Anderson-2/+1
Only link attributes of the meta_list type are considered when matching crate attributes. Instead of doing nothing we can at least log that link attributes of other types were ignored.
2011-07-01Export only what's in use from front::eval. Issue #604Brian Anderson-0/+2
2011-07-01Remove unused imports from front::evalBrian Anderson-7/+0
2011-07-01Remove remaining unused eval methods. Issue #604Brian Anderson-46/+0
2011-07-01Remove the concept of crate directive let statements. Issue #604Brian Anderson-111/+0
2011-07-01Remove the concept of crate directive expressions. Issue #604Brian Anderson-66/+1
2011-07-01Remove the environment concept from front::evalBrian Anderson-59/+31
This is the old method of conditional compilation. It is going away. Issue #489
2011-07-01Cleanup attribute code. Issue #487Brian Anderson-2/+9
2011-07-01Add some helper functions to front::attrBrian Anderson-0/+20
2011-07-01Allow 'newtype' syntax for tagsMarijn Haverbeke-1/+16
Doing this: tag foo = mytype; is now equivalent to doing this: tag foo { foo(mytype); }
2011-06-30Preserve hard \n\n pairs from source when pretty-printing, as explicit ↵Graydon Hoare-4/+20
formatting control from users.