aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/parser.rs
Commit message (Collapse)AuthorAgeFilesLines
* Fix the signature of expr_extBrian Anderson2011-04-211-2/+2
| | | | The extension body is just a string, not an expression.
* rustc: Make the parser never assign any types, not even ty_nilPatrick Walton2011-04-211-5/+4
|
* Remove half-baked 'opacity' layer qualifier.Graydon Hoare2011-04-191-14/+0
|
* Remove effect system from src.Graydon Hoare2011-04-191-147/+128
|
* add log_err to rustcMarijn Haverbeke2011-04-191-2/+9
|
* Work on destructors, not entirely functional yet (no tydesc integration).Graydon Hoare2011-04-141-3/+21
|
* typestate_check can now handle expr_block, expr_if, and expr_binaryTim Chevalier2011-04-121-1/+1
| | | | | | | | | | | | | | | | (caveat for the latter: it assumes that binary operations are strict; a TODO is to detect or and and and correctly reflect that they're lazy in the second argument). I had to add an ann field to ast.block, resulting in the usual boilerplate changes. Test cases that currently work (if you uncomment the typestate pass in the driver) (all these are under test/compile-fail): fru-typestate ret-uninit use-uninit use-uninit-2 use-uninit-3
* rustc: Switch to indices for type parametersPatrick Walton2011-04-121-2/+1
|
* Further work on typestate. Handles expr_rec and expr_assign now.Tim Chevalier2011-04-121-7/+9
| | | | | | | | | | | | Also changed the ts_ann field on statements to be an ann instead, which explains most of the changes. As well, got rid of the "warning: no type for expression" error by filling in annotations for local decls in typeck (not sure whether this was my fault or not). Finally, in bitv, added a clone() function to copy a bit vector, and fixed is_true, is_false, and to_str to not be nonsense.
* Move to single-uint file-position representation.Marijn Haverbeke2011-04-091-209/+204
| | | | | | | | This makes passing them around cheaper. There is now a table (see front/codemap.rs) that is needed to transform such an uint into an actual filename/line/col location. Also cleans up the span building in the parser a bit.
* Support for self-calls that take arguments.Lindsey Kuper2011-04-071-3/+10
| | | | | | | Nicer parsing of self-calls (expr_self_method nodes inside expr_call nodes, rather than a separate expr_call_self) makes typechecking tractable. We can now write self-calls that take arguments and return values (see: test/run-pass/obj-self-*.rs).
* Continued sketching out code for checking states against preconditions.Tim Chevalier2011-04-061-7/+8
| | | | | | | | | It's still sketchy. I added a typestate annotation field to statements tagged stmt_decl or stmt_expr, because a stmt_decl statement has a typestate that's different from that of its child node. This necessitated trivial changes to a bunch of other files all over to the compiler. I also added a few small standard library functions, some of which I didn't actually end up using but which I thought might be useful anyway.
* Last pieces of self-call support.Lindsey Kuper2011-04-051-1/+1
| | | | | | | | The last few pieces of the hack that lets us use trans.trans_call() to translate self-calls, plus a fix for the parser buy that was preventing self-call expressions from getting past parsing. test/run-pass/obj-self.rs works now (as in it actually prints "hi!" twice!).
* Further on the path toward self-awareness.Lindsey Kuper2011-04-051-1/+3
| | | | | | | | | | | | | Mostly: * Merciless refactoring of trans.rs so that trans_call can work for self-calls as well as other kinds of calls Also: * Various changes to go with having idents, rather than exprs, in expr_call_self AST nodes * Added missing case for SELF token to token.to_str()
* Make box prefix operator and box type carry mutability flag.Graydon Hoare2011-04-041-1/+2
|
* Started adding support for typestate checking.Tim Chevalier2011-04-011-18/+18
| | | | | | | | | | | | | | | 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.
* rustc: Add a type annotation to tag itemsPatrick Walton2011-03-311-1/+2
|
* Remove redundant parser logic.Brian Anderson2011-03-311-33/+0
| | | | These cases are all dealt with in parse_expr_inner.
* Improve line comment positioningMarijn Haverbeke2011-03-311-3/+7
| | | | This involved making ast.variant spanned.
* Support break and cont in pretty-printerMarijn Haverbeke2011-03-311-0/+2
|
* Add effect field to ast.ty_fn.Marijn Haverbeke2011-03-311-12/+11
| | | | Still not used, except by the pretty-printer.
* Preserve comments when pretty-printing.Marijn Haverbeke2011-03-311-1/+3
| | | | | The patch also includes a number of smaller fixes to the pretty-printer that were encountered on the way.
* rustc: Thread an item-to-type mapping throughout the typechecking and ↵Patrick Walton2011-03-301-2/+2
| | | | translation phases
* Beginnings of support for magical self prefix; nothing profound happening yet.Lindsey Kuper2011-03-291-0/+15
|
* Ignore 'mutable foo' in plain field contexts.Graydon Hoare2011-03-291-0/+6
|
* Add expr_spawn, spawn parsing, folding, typechecking, ty_taskBrian Anderson2011-03-281-0/+24
|
* rustc: Add support for calling LLVM intrinsics as native functionsPatrick Walton2011-03-281-0/+2
|
* Add support for break and cont to rustcMarijn Haverbeke2011-03-271-0/+10
| | | | | Testing proper cleanup is hampered by https://github.com/graydon/rust/issues/293
* Another go at changing compile-command, this time using RBUILD env var.Graydon Hoare2011-03-251-1/+1
|
* Revert "Bulk-edit compile commands in emacs chatter to point to assumed ↵Graydon Hoare2011-03-251-1/+1
| | | | | | build/ dir off src root." This reverts commit 846f2e2ba994268725f38c36fa12f1a09f21615c.
* Bulk-edit compile commands in emacs chatter to point to assumed build/ dir ↵Graydon Hoare2011-03-251-1/+1
| | | | off src root.
* rustc: Store cached crate metadata in the sessionPatrick Walton2011-03-251-1/+1
|
* Update pretty printer for ports, channels, send and receiveBrian Anderson2011-03-251-0/+2
|
* Implement local declarations with receive. Un-XFAIL decl-with-recv.rs.Brian Anderson2011-03-251-6/+14
|
* Refactor ast.local to make room for initialization via recvBrian Anderson2011-03-251-3/+4
|
* Support for 'float' in type signatures.Lindsey Kuper2011-03-231-0/+1
|
* Further support for floating-point. Literals with exponents workTim Chevalier2011-03-221-0/+4
| | | | | | and literals with the 'f32' or 'f64' suffixes work as well. In addition, logging things with the f32 or f64 type works. (float is still assumed to be a synonym for f64).
* Started adding support for floating-point type, floating-point literals, and ↵Tim Chevalier2011-03-211-0/+4
| | | | logging of floats. Other operations on float probably don't work yet.
* Modify native_item_fn to handle trailing linkage names that differ from the ↵Graydon Hoare2011-03-201-1/+7
| | | | item name (used in win32 build of std.dll)
* rustc: When encountering "mutable" as a tycon, parse it, drop it on the ↵Patrick Walton2011-03-181-0/+9
| | | | floor, and emit a warning
* rustc: Implement "mutable?". Add a test case and XFAIL it in rustboot for now.Patrick Walton2011-03-181-0/+4
|
* rustc: Switch mutability from being a type constructor to a field annotationPatrick Walton2011-03-171-40/+54
|
* rustc: Typo: mutabliity -> mutabilityPatrick Walton2011-03-171-3/+3
|
* Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. ↵Graydon Hoare2011-03-161-11/+9
| | | | Tweak std lib vec fns in process.
* rustc: Add an annotation for the crate definition to view_item_usePatrick Walton2011-03-151-1/+2
|
* Merge remote branch 'brson/recursive-elseif'Graydon Hoare2011-03-141-31/+23
|\
| * Merge branch 'master' into recursive-elseifBrian Anderson2011-03-131-41/+15
| |\ | | | | | | | | | | | | | | | Conflicts: src/comp/middle/typeck.rs
| * \ Merge branch 'master' into recursive-elseifBrian Anderson2011-03-071-314/+738
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Conflicts: src/Makefile src/comp/front/ast.rs src/comp/front/parser.rs src/comp/middle/fold.rs src/comp/middle/trans.rs
| * | | Allow the else part of an expr_if to be either expr_if or expr_blockBrian Anderson2011-02-011-10/+9
| | | |
| * | | Teach rustc to parse 'else if'Brian Anderson2011-01-301-2/+16
| | | |