aboutsummaryrefslogtreecommitdiff
path: root/src/comp/front/lexer.rs
Commit message (Collapse)AuthorAgeFilesLines
* Make the parser more careful about keywordsMarijn Haverbeke2011-05-131-146/+1
| | | | | | Keywords are now only recognized in contexts where they are valid. The lexer no longer recognizes them, all words are lexed as IDENT tokens, that get interpreted by the parser.
* Downcase std modules again, move to :: for module dereferencingMarijn Haverbeke2011-05-121-198/+198
| | | | This should be a snapshot transition.
* Change module dereference syntax from . to ::Marijn Haverbeke2011-05-121-2/+10
| | | | This will need to be a snapshot.
* Properly lex block comments followed by EOFMarijn Haverbeke2011-05-121-4/+4
|
* Remove unused filename parameter from lexer.new_readerBrian Anderson2011-05-111-2/+2
|
* Give the lexer a session so that it can fail more informativelyBrian Anderson2011-05-111-18/+29
|
* Remove boxes from token.t.Graydon Hoare2011-05-091-7/+20
|
* Rename std modules to be camelcasedMarijn Haverbeke2011-05-061-40/+40
| | | | (Have fun mergining your stuff with this.)
* Bring back "pred" syntax for writing predicates for checkTim Chevalier2011-05-051-0/+1
| | | | | | | | | | This commit reinstates the requirement that the predicate in a "check" must be a manifest call to a special kind of function declared with the new "pred" keyword instead of "fn". Preds must have a boolean return type and can only call other preds; they can't have any effects (as enforced by the typechecker). The arguments to a predicate in a check expression must be slot variables or literals.
* Remove 'deprecated mutable...' from our codeMarijn Haverbeke2011-05-051-1/+1
| | | | This should make compilation a bit less noisy.
* Un-revert "Use different syntax for checks that matter to typestate", fixing ↵Patrick Walton2011-05-021-1/+2
| | | | | | the problem. This reverts commit d08b443fffb1181d8d45ae5d061412f202dd4118.
* Revert "Use different syntax for checks that matter to typestate"Graydon Hoare2011-05-021-2/+1
| | | | This reverts commit aa25f22f197682de3b18fc4c8ba068d1feda220f. It broke stage2, not sure why yet.
* Use different syntax for checks that matter to typestateTim Chevalier2011-05-021-1/+2
| | | | | | | | | | This giant commit changes the syntax of Rust to use "assert" for "check" expressions that didn't mean anything to the typestate system, and continue using "check" for checks that are used as part of typestate checking. Most of the changes are just replacing "check" with "assert" in test cases and rustc.
* Remove half-baked 'opacity' layer qualifier.Graydon Hoare2011-04-191-2/+0
|
* Remove effect system from src.Graydon Hoare2011-04-191-19/+18
|
* replace error logging with log_err in stdlib and rustcMarijn Haverbeke2011-04-191-14/+11
|
* add log_err to rustcMarijn Haverbeke2011-04-191-0/+1
|
* Lex numeric escapes, needed for lib-str.rs (which now passes).Graydon Hoare2011-04-131-13/+77
|
* Move to single-uint file-position representation.Marijn Haverbeke2011-04-091-43/+38
| | | | | | | | 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.
* Make lexer buffer the whole fileMarijn Haverbeke2011-04-091-59/+66
| | | | | This way, it won't have to go through a bunch of calls for each byte fetched.
* Started adding support for typestate checking.Tim Chevalier2011-04-011-1/+1
| | | | | | | | | | | | | | | 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.
* handle unterminated block comments and line comment at eofMarijn Haverbeke2011-03-311-4/+9
|
* Preserve comments when pretty-printing.Marijn Haverbeke2011-03-311-0/+80
| | | | | The patch also includes a number of smaller fixes to the pretty-printer that were encountered on the way.
* Beginnings of support for magical self prefix; nothing profound happening yet.Lindsey Kuper2011-03-291-0/+1
|
* Add support for break and cont to rustcMarijn Haverbeke2011-03-271-0/+2
| | | | | 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.
* Parse FP literals without coercing to int. This allows parsing 64-bitTim Chevalier2011-03-251-36/+59
| | | | | | floats. However, if someone writes a literal that can't be represented precisely in 64 bits, the front-end will accept it while the back-end will (presumably) complain.
* make lexer unicode-aware for strings and char literalsMarijn Haverbeke2011-03-251-5/+5
|
* Start making the standard-lib utf-8 awareMarijn Haverbeke2011-03-251-3/+3
| | | | | | Finally implements _str.is_utf8, adds from_chars, from_char, to_chars, char_at, char_len, (push|pop|shift|unshift)_char. Also, proper character I/O for streams.
* Further support for floating-point. Literals with exponents workTim Chevalier2011-03-221-7/+68
| | | | | | 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-12/+36
| | | | logging of floats. Other operations on float probably don't work yet.
* Switch all vases of vec += elt to vec += vec. Prohibit former in rustboot. ↵Graydon Hoare2011-03-161-7/+7
| | | | Tweak std lib vec fns in process.
* Extend stream functionalityMarijn Haverbeke2011-03-141-6/+6
| | | | | | Writer and reader streams now come with methods to write and read little-endian numbers. Whether that is the right place for such methods is debatable, but for now, that's where they live.
* Make ret and fail stmts have 0 out-edges, Closes #250.Graydon Hoare2011-03-051-4/+1
|
* Teach rustc about reserved keywordsBrian Anderson2011-02-221-1/+16
|
* Rename std._io to std.io since 'io' is no longer a keywordBrian Anderson2011-02-221-1/+1
|
* rustc: Lex '_' as an underscore, not as an identifierPatrick Walton2010-12-151-1/+4
|
* Fix token span tracking in lexer.Graydon Hoare2010-12-091-3/+7
|
* Implement binop= forms. Un-XFAIL bitwise.rs.Graydon Hoare2010-12-081-1/+1
|
* Support mach types in rustc, enable 5 more tests.Graydon Hoare2010-11-221-34/+95
|
* Fix lexer bug, enable 5 more tests on rustc.Graydon Hoare2010-11-221-1/+1
|
* Teach rustc lexer about changes to stratum, opacity and effect keywords.Graydon Hoare2010-11-031-1/+5
|
* First pass on splitting stratum and opacity off of effects. WIP.Graydon Hoare2010-11-021-7/+7
|
* rustc: Lex identifiers that have numbers in them tooPatrick Walton2010-10-131-2/+6
|
* Patchwork of attempted fixes to effect system and gc system; eventually give ↵Graydon Hoare2010-09-291-9/+9
| | | | up and disable it entirely in the runtime. Will need extensive reworking.
* Translate a bunch of the material (lltrans, llasm, abi) from rustboot to ↵Graydon Hoare2010-09-231-0/+595
rustc, and move files around.