about summary refs log tree commit diff
path: root/src/comp/syntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-748/+0
2012-03-02Avoid hitting unicode lib per char.Graydon Hoare-2/+9
2012-02-23(core::str) remove len_bytes aliasKevin Cantu-7/+7
2012-02-23(core::str) replace uses of unsafe::slice_bytes; replace find[_from]_bytes ↵Kevin Cantu-2/+2
with find[_from]
2012-02-22Make the various from_str functions return optionsMarijn Haverbeke-4/+4
So that they can be used with user input without causing task failures. Closes #1335
2012-02-14Correctly handle the character position at the EOF.Kevin Atkinson-1/+7
Fixes issue #1785.
2012-02-12(core::str) rename byte_len -> len_bytes and rename char_len -> lenKevin Cantu-7/+7
2012-02-12(core::str) move push_byte, push_bytes, pop_byte, and shift_byte into ↵Kevin Cantu-8/+8
str::unsafe
2012-02-10Output meaningful lexer error when no digits given for numberMarijn Haverbeke-0/+6
Closes #1802
2012-02-09Remove some pointless importsMarijn Haverbeke-3/+0
2012-02-05Remove support for $(...) form of quasi-quotes, use #ast{...} instead.Kevin Atkinson-1/+0
2012-02-03Fix various drift issues in the qq branch.Graydon Hoare-2/+5
2012-02-03Implement anti-quotes.Kevin Atkinson-2/+3
2012-02-03Add support for parsing quasi-quotes, doesn't do anything useful yet.Kevin Atkinson-0/+18
2012-02-01Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes andKevin Cantu-2/+2
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01Propagating unsafe::slice 3Kevin Cantu-1/+2
2012-02-01Propagating unsafe::slice 2Kevin Cantu-4/+4
2012-01-31Change option::t to optionTim Chevalier-1/+1
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-30Remove ternary operatorPaul Woolcock-4/+0
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have been removed.
2012-01-30Change all ternary ops to if/then/elsePaul Woolcock-10/+10
All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression.
2012-01-27Merge remote-tracking branch 'killerswan/fixing_strings_2'Brian Anderson-1/+1
Conflicts: src/comp/driver/driver.rs src/comp/middle/trans/base.rs src/comp/syntax/parse/lexer.rs
2012-01-25Keep source file around after parsing.Kevin Atkinson-10/+10
Specifically box the string (to avoid unnecessary copies) and store it in codemap::filemap. Remove the hack in driver::diagnostic that rereads the source from the file and instead just get the source from the filemap. (This commit is also a prerequisite for issue #1612)
2012-01-25Replacing str::unsafe_from_bytes with str::from_bytes (part 4)Kevin Cantu-1/+1
2012-01-24rustc: Split diagnostics into "span diagnostics" and "diagnostics".Patrick Walton-6/+7
The former contain a codemap (which is per-crate), and the latter don't. This will be useful in order to allow more than one crate to be compiled in one run of the compiler.
2012-01-19rustc: ";" to "," in enumsPatrick Walton-4/+4
2012-01-19rustc: "tag" -> "enum"Patrick Walton-1/+1
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-1/+1
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-13rustc: Rename the lexer's err message to fatal and make it failBrian Anderson-17/+12
2012-01-13rustc: Replace the lexer's error handling with diagnostic implBrian Anderson-6/+14
2012-01-13rustc: Extract driver::diagnostic from syntax::codemapBrian Anderson-1/+2
2012-01-13rustc: Refactor codemap::emit_* functionsBrian Anderson-2/+2
A codemap is only needed when we have a span so put them both into the option.
2012-01-13Convert the objects used in the lexer and parser to records + implsMarijn Haverbeke-133/+115
2012-01-11Major clean-up of std::ioMarijn Haverbeke-0/+1
Use ifaces instead of objs, stop wrapping everything in two (or three) layers of no-value-added indirection, and remove some of the more pointless/outdated idioms from the code.
2012-01-09Change all uses of 'when' in alt-patterns to 'if'Austin Seipp-1/+1
Issue #1396
2011-12-29Add support in lexer for utf8 identifiers. No NFKC logic in char yet.Graydon Hoare-2/+4
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-3/+3
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-11/+11
#debug.
2011-12-16Make 1.f parse as a field access on the integer 1Marijn Haverbeke-1/+1
A dot is only considered part of a number when not followed by a letter Closes #1306
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-5/+6
2011-12-08Consider variant constructors pure functions for the purpose of purity checkingMarijn Haverbeke-1/+0
Closes #1269
2011-12-07Change literal representation to not truncateMarijn Haverbeke-69/+50
Also shuffles around the organization of numeric literals and types, separating by int/uint/float instead of machine-vs-non-machine types. This simplifies some code. Closes #974 Closes #1252
2011-12-02Stop lexing -1 as a single tokenMarijn Haverbeke-49/+2
And remove the hack that made 1-1 work given that other hack. Issue #954
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-10Cleanup unused importsHaitao Li-2/+1
2011-11-03Disallow writing to function arguments againMarijn Haverbeke-16/+5
Remove implicit copying hack. Closes #1118
2011-10-07Make 1-1 parse againMarijn Haverbeke-0/+37
Issue #954 This is not a very elegant fix -- we should probably do something with constant folding to handle negative-int alt patterns in the future.
2011-09-27Patch to error instead of crashing when parsing unmatched double quotesWade Mealing-0/+7
Patch to error and fail instead of using all available memory then crashing to detect the error condition of an unmatched double quote before the end of a file. I couldn't get it to show nice error messages, so this may not be the ideal fix. A test case for this situation has also been added.
2011-09-16Require body of else-less if expressions to be a value-less blockMarijn Haverbeke-1/+1
For consistency with other constructs that could not possibly return a value (say, loops).
2011-09-14Add support for negative literals.Josh Matthews-6/+25
2011-09-13Improve lexing of float literalsMarijn Haverbeke-39/+36
Closes #575