Commit Graph

20 Commits

Author SHA1 Message Date
Marijn Haverbeke
7595fe5153 Implement record patterns
Closes #469.
2011-07-11 15:32:41 +02:00
Marijn Haverbeke
86ee3454a1 Implement or-patterns in case clauses
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-11 11:01:54 +02:00
Jesse Ruderman
ab50da9445 Export noop_fold_expr so the fuzzer can use it 2011-07-10 17:05:25 -07:00
Brian Anderson
5543404abe Track the path as we fold over the AST looking for unit tests. Issue #428 2011-07-09 12:35:30 -07:00
Patrick Walton
e1b107d74e rustc: Remove all exterior vectors from the AST 2011-07-07 18:39:05 -07:00
Patrick Walton
0e2fff5337 rustc: Change lots of AST nodes to use interior vectors 2011-07-07 12:53:17 -07:00
Patrick Walton
f164d7779a rustc: Move AST constraints to interior vectors 2011-07-06 16:12:39 -07:00
Patrick Walton
401b6362d7 rustc: Make meta items into interior vectors 2011-07-06 15:46:03 -07:00
Patrick Walton
479ce4d783 rustc: Move crate directives over to interior vectors 2011-07-06 15:15:06 -07:00
Patrick Walton
0226f56115 rustc: Convert attribute in the AST to interior vectors 2011-07-06 15:15:00 -07:00
Patrick Walton
7714cb297b rustc: Make AST paths use interior vectors 2011-07-06 15:14:52 -07:00
Brian Anderson
b06ccb45ab Begin adding unit testing infrastructure to the compiler
Add a --test flag and a pass for transforming the AST to generate a test
harness.

Issue #428
2011-07-06 14:39:36 -07:00
Lindsey Kuper
e30d2c82ae Simplify AST for expr_anon_obj. 2011-07-06 11:36:06 -07:00
Patrick Walton
bbdba21b1f rustc: Revert the conversion to interior vectors due to heap corruption 2011-07-06 11:26:26 -07:00
Patrick Walton
ec890fff23 Temp commit on the way to making meta_item into an interior vector 2011-07-06 11:09:08 -07:00
Patrick Walton
3f6c9f8d84 rustc: Move crate directives over to interior vectors 2011-07-06 11:09:08 -07:00
Patrick Walton
c927d97fa0 rustc: Convert attribute in the AST to interior vectors 2011-07-06 11:09:08 -07:00
Patrick Walton
1591955adf rustc: Make AST paths use interior vectors 2011-07-06 11:09:08 -07:00
Brian Anderson
8499c77cee Parse attributes for native items. Closes #609 2011-07-05 12:43:44 -07:00
Marijn Haverbeke
6fd6fdea93 Move everything syntax-related to syntax/, break deps on rest of compiler
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-05 15:57:21 +02:00