Tim Chevalier
3130348ee1
Started adding support for typestate checking.
...
I added a new field to the ast "ann" type for typestate information.
Currently, the field contains a record of a precondition bit vector and
postcondition vector, but I tried to structure things so as to make
it easy to change the representation of the typestate annotation type.
I also had to add annotations to some syntactic forms that didn't have
them before (fail, ret, be...), with all the boilerplate changes
that that would imply.
The main call to the typestate_check entry point is commented out and
the actual pre-postcondition algorithm only has a few cases
implemented, though the overall AST traversal is there. The rest of
the typestate algorithm isn't implemented yet.
2011-04-01 11:27:32 -07:00
Brian Anderson
d631f29d47
Add block_to_str and expr_to_str methods to the pprust module.
...
Since pprust is authed impure these can be used for debug logging.
2011-03-31 23:15:11 -04:00
Patrick Walton
c66edca83d
rustc: Add a type annotation to tag items
2011-03-31 19:12:40 -07:00
Lindsey Kuper
ef0c903f6a
More stuff to go with the new expr_call_self AST node
2011-03-31 14:16:02 -07:00
Marijn Haverbeke
39f0656b4f
Improve line comment positioning
...
This involved making ast.variant spanned.
2011-03-31 14:41:40 +00:00
Marijn Haverbeke
8a7ea941bb
Support break and cont in pretty-printer
2011-03-31 14:41:40 +00:00
Marijn Haverbeke
f8393cc572
Add effect field to ast.ty_fn.
...
Still not used, except by the pretty-printer.
2011-03-31 14:41:40 +00:00
Marijn Haverbeke
e7e6f396d8
Preserve comments when pretty-printing.
...
The patch also includes a number of smaller fixes to the
pretty-printer that were encountered on the way.
2011-03-31 14:41:39 +00:00
Brian Anderson
9ca7acb1f3
Update pretty printer for ports, channels, send and receive
2011-03-25 11:01:52 -07:00
Brian Anderson
71f058499a
Refactor ast.local to make room for initialization via recv
2011-03-25 11:01:52 -07:00
Marijn Haverbeke
d4c3059e1e
make lexer unicode-aware for strings and char literals
2011-03-25 08:23:00 -07:00
Tim Chevalier
caa22c9341
Started adding support for floating-point type, floating-point literals, and logging of floats. Other operations on float probably don't work yet.
2011-03-21 18:10:34 -07:00
Graydon Hoare
4b946cea35
Modify native_item_fn to handle trailing linkage names that differ from the item name (used in win32 build of std.dll)
2011-03-20 20:18:19 -07:00
Patrick Walton
2ef9c01ffc
rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.
2011-03-18 11:49:47 -07:00
Patrick Walton
5eca7129e3
rustc: Switch mutability from being a type constructor to a field annotation
2011-03-17 17:39:47 -07:00
Graydon Hoare
54587bdccb
Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. Tweak std lib vec fns in process.
2011-03-16 14:58:02 -07:00
Patrick Walton
71b6e602c5
rustc: Add an annotation for the crate definition to view_item_use
2011-03-15 17:33:05 -07:00
Graydon Hoare
7f5bffc3ea
Merge remote branch 'brson/recursive-elseif'
2011-03-14 16:59:04 -07:00
Marijn Haverbeke
77f4c52c3e
Make pretty-printer print 'with' clause in rec literals
2011-03-14 14:57:13 -07:00
Brian Anderson
bbb6836da0
Merge branch 'master' into recursive-elseif
...
Conflicts:
src/comp/middle/typeck.rs
2011-03-13 19:40:25 -04:00
Marijn Haverbeke
ec22fe9733
Add ty_obj case to pretty printer
2011-03-09 16:15:58 -08:00
Marijn Haverbeke
aed40fbcd8
Have the pretty-printer take a writer stream as argument
...
It now uses a string writer to also fill in for
middle.ty.ast_ty_to_str
2011-03-09 16:15:55 -08:00
Brian Anderson
5aabe7e84f
Add partial pretty-printing for syntax extensions
2011-03-07 22:06:26 -05:00
Brian Anderson
5ba012f4a5
Add missing alt arm to expr_if pretty-printer
2011-03-07 22:05:55 -05:00
Brian Anderson
9fc4db6b89
Merge branch 'master' into recursive-elseif
...
Conflicts:
src/Makefile
src/comp/front/ast.rs
src/comp/front/parser.rs
src/comp/middle/fold.rs
src/comp/middle/trans.rs
2011-03-07 21:21:01 -05:00
Marijn Haverbeke
0624f9db4a
Add a pretty-printer
...
Adds a -pp option to the compiler which will cause it to simply
pretty-print the given file.
2011-03-07 12:58:08 -08:00