summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer.rs
AgeCommit message (Collapse)AuthorLines
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-2/+2
2013-03-22librustc: Remove `pure` from libsyntax and librustc.Patrick Walton-5/+5
2013-03-22syntax: replace uses of old deriving attribute with new oneAndrew Paseltiner-1/+1
2013-03-21auto merge of #5407 : jbclements/rust/add-assert-eq-macro, r=jbclementsbors-10/+9
Adds an assert_eq! macro that asserts that its two arguments are equal. Error messages can therefore be somewhat more informative than a simple assert, because the error message includes "expected" and "given" values.
2013-03-21back-renamed slice_DBG_BRWD, slice_V_DBG_BRWD -> slice, slice_DBG_UNIQ -> ↵Marvin Löbel-1/+1
slice_unique
2013-03-21renamed str::view -> slice_DBG_BRWDMarvin Löbel-2/+2
renamed str::slice -> slice_DBG_UNIQ changed vec slice method -> to_owned() renamed vec view method -> slice_V_DBG_BRWD
2013-03-20change some uses of fail_unless to assert_eqJohn Clements-10/+9
2013-03-18librustc: Make the compiler ignore purity.Patrick Walton-2/+2
For bootstrapping purposes, this commit does not remove all uses of the keyword "pure" -- doing so would cause the compiler to no longer bootstrap due to some syntax extensions ("deriving" in particular). Instead, it makes the compiler ignore "pure". Post-snapshot, we can remove "pure" from the language. There are quite a few (~100) borrow check errors that were essentially all the result of mutable fields or partial borrows of `@mut`. Per discussions with Niko I think we want to allow partial borrows of `@mut` but detect obvious footguns. We should also improve the error message when `@mut` is erroneously reborrowed.
2013-03-13librustc: Don't accept `as Trait` anymore; fix all occurrences of it.Patrick Walton-9/+9
2013-03-07librustc: Convert all uses of `assert` over to `fail_unless!`Patrick Walton-6/+6
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-1/+0
2013-03-04Remove unused imports throughout src/Alex Crichton-1/+0
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-2/+6
2013-02-28Fix implicit leaks of imports throughout librariesAlex Crichton-2/+6
Also touch up use of 'pub' and move some tests around so the tested functions don't have to be 'pub'
2013-02-27Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1/+49
2013-02-27librustc: Forbid `pub` or `priv` before trait implementationsPatrick Walton-1/+1
2013-02-26Macros now leave scopeJohn Clements-0/+48
Macro scope is now delimited by function, block, and module boundaries, except for modules that are marked with #[macro_escape], which allows macros to escape.
2013-02-25libsyntax: make lexer vecs_implicitly_copyable-freeErick Tryzelaar-8/+17
2013-02-15librustc: Stop parsing `impl Type : Trait` and fix several declarations that ↵Patrick Walton-1/+1
slipped through. r=tjc
2013-02-14auto merge of #4911 : lifthrasiir/rust/comment-exemptions, r=catamorphismbors-11/+26
This is a natural extension of #4887, and handles the following three cases: ~~~~ a line with only /s //////////////////////////////////////////// a line with only /s followed by whitespace //////////////////////////////////////////// a block comment with only *s between two /s /********************************/ ~~~~
2013-02-14librustc: Replace `impl Type : Trait` with `impl Trait for Type`. ↵Patrick Walton-1/+1
rs=implflipping
2013-02-13Remove die!, raplace invocations with fail! Issue #4524 pt 3Nick Desaulniers-1/+1
2013-02-13libsyntax: don't parse ////, /***/ as doc commentsKang Seonghoon-11/+26
2013-02-08Add and lex LIFETIME tokensNiko Matsakis-16/+81
cc #4846
2013-02-07librustc: Lots of de-muting. rs=demutingPatrick Walton-79/+78
2013-02-07auto merge of #4791 : jbclements/rust/demodeing-and-deGCing, r=jbclements,brsonbors-44/+45
r? It looks to me like the string_reader and tt_reader structs are GC pointers only because they predate the modern borrow system. This commit leaves the type names string_reader and tt_reader alone (they still refer to GC-ed pointers), but internally the functions now use borrowed pointers to refer to these structures. My guess would be that it's possible to move this change outward and not use the GCed pointers at all, but that change looks like it could be a larger one. Actually, I'm delighted at how quick this change was.
2013-02-06libsyntax: no binary/hex float literalsKang Seonghoon-0/+7
2013-02-04demodeing, un-gc-ingJohn Clements-44/+45
It looks to me like the string_reader and tt_reader structs are GC pointers only because they predate the modern borrow system. This commit leaves the type names string_reader and tt_reader alone (they still refer to GC-ed pointers), but internally the functions now use borrowed pointers to refer to these structures. My guess would be that it's possible to move this change outward and not use the GCed pointers at all, but that change looks like it could be a larger one. Actually, I'm delighted at how quick this change was.
2013-02-03Converted libcore/uint-template.rs to the new string functions.Marvin Löbel-2/+2
- Moved ToStr implementation of unsigned integers to uint-template.rs. - Marked the `str()` function as deprecated. - Forwarded all conversion functions to `core::num::to_str_common()` and `core::num::from_str_common()`. - Fixed most places in the codebase where `to_str()` is being used. - Added uint-template to_str and from_str overflow tests.
2013-01-31test cases, cleanupJohn Clements-32/+81
2013-01-31Replace most invocations of fail keyword with die! macroNick Desaulniers-1/+1
2013-01-29libsyntax: De-export a lot of libsyntax. rs=deëxportingPatrick Walton-20/+17
2013-01-29libstd: Remove "dual impls" from the language and enforce coherence rules. ↵Patrick Walton-1/+1
r=brson "Dual impls" are impls that are both type implementations and trait implementations. They can lead to ambiguity and so this patch removes them from the language. This also enforces coherence rules. Without this patch, records can implement traits not defined in the current crate. This patch fixes this, and updates all of rustc to adhere to the new enforcement. Most of this patch is fixing rustc to obey the coherence rules, which involves converting a bunch of records to structs.
2013-01-23libsyntax: Remove `fn() unsafe { ... }`. r=graydonPatrick Walton-5/+7
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-1/+3
module scope. r=tjc
2013-01-08Revert "librustc: Make unqualified identifier searches terminate at the ↵Patrick Walton-3/+1
nearest module scope. r=tjc" This reverts commit a8d37af2473da79be704c9ce2374f278c47177b6.
2013-01-08librustc: Make unqualified identifier searches terminate at the nearest ↵Patrick Walton-1/+3
module scope. r=tjc
2012-12-27librustc: Terminate name searches at the nearest module scope for paths that ↵Patrick Walton-3/+14
contain at least two components. r=graydon
2012-12-12syntax: remove most code handling old-style syntax extensions.Graydon Hoare-5/+0
2012-12-04librustc: Remove all legacy pattern bindings from libsyntax and librustc. ↵Patrick Walton-2/+2
rs=refactoring
2012-12-03Update license, add license boilerplate to most files. Remainder will follow.Graydon Hoare-0/+10
2012-11-18Remove some unused code from lexerBrian Anderson-6/+2
2012-11-17Merge remote-tracking branch 'brson/codemap'Brian Anderson-41/+62
Conflicts: src/libsyntax/ext/source_util.rs
2012-11-16Remove unused types from codemapBrian Anderson-1/+1
2012-11-16Stop storing char positions in CodeMapBrian Anderson-18/+12
2012-11-16Change spans to use byte offsets instead of char offsetsBrian Anderson-8/+13
2012-11-15Add some comments to codemap and lexerBrian Anderson-0/+4
2012-11-15Refactor the lexer to use FilePos typesBrian Anderson-25/+43
2012-11-14Factor out some position management code in the lexerBrian Anderson-7/+7
2012-11-14Add types for character position and byte position in the codemapBrian Anderson-25/+25