about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-05-31auto merge of #6833 : fdr/rust/fix-warnings, r=Aatchbors-4/+1
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
2013-05-30Fix parser testNiko Matsakis-1/+1
2013-05-30Remove unnecessary 'use' formsDaniel Farina-4/+1
Fix a laundry list of warnings involving unused imports that glutted up compilation output. There are more, but there seems to be some false positives (where 'remedy' appears to break the build), but this particular set of fixes seems safe.
2013-05-30Remove copy bindings from patterns.Niko Matsakis-59/+54
2013-05-30Remove a bunch of unnecessary allocations and copiesBjörn Steinbrink-1/+2
2013-05-29librustc: Stop reexporting the standard modules from prelude.Patrick Walton-0/+18
2013-05-29libsyntax: Stop parsing mutable fieldsPatrick Walton-6/+4
2013-05-29libsyntax: Make `drop` no longer a keywordPatrick Walton-2/+0
2013-05-28Remove unnecessary allocations flagged by lintSeo Sanghyeon-20/+20
2013-05-25auto merge of #6722 : alexcrichton/rust/issue-4219-no-merge-hack, r=brsonbors-34/+1
Changes the int/uint modules to all use macros instead of using the `merge` attribute. It would be nice to have #4375 resolved as well for this, but that can probably come at a later date. Closes #4219.
2013-05-25Use an enum for keywords and intern them to improve parser performanceBjörn Steinbrink-243/+277
Currently, keywords are stored in hashsets that are recreated for every Parser instance, which is quite expensive since macro expansion creates lots of them. Additionally, the parser functions that look for a keyword currently accept a string and have a runtime check to validate that they actually received a keyword. By creating an enum for the keywords and inserting them into the ident interner, we can avoid the creation of the hashsets and get static checks for the keywords. For libstd, this cuts the parse+expansion part from ~2.6s to ~1.6s.
2013-05-24Remove the #[merge] hack from the parserAlex Crichton-34/+1
2013-05-24auto merge of #6680 : ben0x539/rust/slashslashslash, r=graydonbors-2/+9
There's currently a function in the lexer that rejects a line comment that is all slashes from being a doc comment. I think the intention was that you could draw boxes, ///////////// // like so // ///////////// Since a line doc comment split up over multiple paragraphs will have a "blank" line that is just /// between the paragraphs, that would get mistaken for a box segment, lexed as a regular comment, and go missing from the sequence of doc comment attributes before they were reassembled by rustdoc into markdown input. I figure the best plan here is to just declare that a comment that is exactly `///` is a doc comment after all, and to only omit comments with four slashes or more, which is what this commit implements. Can't really draw boxes that narrow, anyway.
2013-05-23cleanup warnings from libsyntaxErick Tryzelaar-3/+3
2013-05-22librustc: Change `std` to `extra` throughout libsyntax and librustcPatrick Walton-6/+4
2013-05-22libextra: Rename the actual metadata names of libcore to libstd and libstd ↵Patrick Walton-0/+11
to libextra
2013-05-22declare that "///" is still a doc comment, just not "////+" (fixes #5838)Benjamin Herr-2/+9
2013-05-22Fix #6342Jihyun Yu-4/+9
2013-05-21Correct span for expr_vecSeo Sanghyeon-1/+1
2013-05-20Remove all unnecessary allocations (as flagged by lint)Alex Crichton-39/+37
2013-05-20getting rid of interner_key! macroJohn Clements-32/+42
2013-05-20hygiene infrastructure.John Clements-19/+14
- added a hash table to memoize rename and mark operations. - added rename, mark, and resolve fold fns
2013-05-20detect unused attrs in one more place, allow parsing to continue for allJohn Clements-24/+53
changed a bunch of fatal()'s into err()'s, to allow parsing to proceed.
2013-05-20parser commentJohn Clements-0/+1
2013-05-20refactoring test functionsJohn Clements-70/+7
2013-05-20auto merge of #6635 : brson/rust/snapshot, r=brsonbors-16/+0
2013-05-19Register snapshotsBrian Anderson-16/+0
2013-05-19Fix many warnings.Steve Klabnik-2/+2
2013-05-19Use assert_eq! rather than assert! where possibleCorey Richardson-1/+1
2013-05-16Add BuiltinBounds to closure type: parse and handle subtyping,Niko Matsakis-10/+13
but do not integrate with kindck etc (requires a snapshot first)
2013-05-15auto merge of #6502 : huonw/rust/no-auto-code, r=graydonbors-9/+3
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual auto_* code, leaving stubs to refer the user to the new syntax. Also, moves the useful contents of auto_encode.rs to more appropriate spots: tests and comments to deriving/encodable.rs, and the ExtCtxtMethods trait to build.rs (unused so far, but the method syntax might be nicer than using the mk_* fns in many instances).
2013-05-16syntax: deprecate #[auto_{en,de}code] in favour of #[deriving({En,De}codable)].Huon Wilson-9/+3
Replace all instances of #[auto_*code] with the appropriate #[deriving] attribute and remove the majority of the actual code, leaving stubs to refer the user to the new syntax.
2013-05-15auto merge of #6499 : dotdash/rust/static_keywords, r=thestingerbors-125/+125
2013-05-15auto merge of #6487 : recrack/rust/vec_len, r=thestingerbors-3/+3
Rename vec::len(var) to var.len() ``` libcore, libfuzzer, librustc, librustdoc, libstd, libsyntax test/auxiliary test/bench test/run-pass ```
2013-05-15Allow static strings to be used with keyword checksBjörn Steinbrink-125/+125
2013-05-14auto merge of #6224 : erickt/rust/rustc-cleanup, r=ericktbors-18/+18
Just a couple minor cleanups and renames of librustc
2013-05-14rustc: rename ast::self_ty and related fields to explicit_selfErick Tryzelaar-18/+18
2013-05-15Rename vec::len(var) to var.len()Youngmin Yoo-3/+3
2013-05-14Add inlining for iter_bytes for types used as hashmap keysBjörn Steinbrink-0/+2
Not inlining these affects the hash table performance quite badly.
2013-05-14Fix test fallout from removing vecs_implicitly_copyableAlex Crichton-8/+7
2013-05-14syntax: Remove #[allow(vecs_implicitly_copyable)]Alex Crichton-26/+29
2013-05-14Use static string with fail!() and remove fail!(fmt!())Björn Steinbrink-2/+2
fail!() used to require owned strings but can handle static strings now. Also, it can pass its arguments to fmt!() on its own, no need for the caller to call fmt!() itself.
2013-05-12libsyntax: Tighten up expressions in patterns to only allow identifiers or ↵Patrick Walton-3/+30
literals (possibly with a minus). This had very minimal fallout.
2013-05-12librustc: Make `self` and `static` into keywordsPatrick Walton-55/+46
2013-05-12libsyntax: Remove `extern mod foo { ... }` from the language.Patrick Walton-6/+17
2013-05-11Warning policeTim Chevalier-6/+5
2013-05-10Remove the '<->' operator from the languageAlex Crichton-4/+11
2013-05-10auto merge of #6223 : alexcrichton/rust/issue-6183, r=pcwaltonbors-0/+15
Closes #6183. The first commit changes the compiler's method of treating a `for` loop, and all the remaining commits are just dealing with the fallout. The biggest fallout was the `IterBytes` trait, although it's really a whole lot nicer now because all of the `iter_bytes_XX` methods are just and-ed together. Sadly there was a huge amount of stuff that's `cfg(stage0)` gated, but whoever lands the next snapshot is going to have a lot of fun deleting all this code!
2013-05-10auto merge of #6329 : sonwow/rust/issue-6306, r=ILyoanbors-2/+2
Fix for #6306
2013-05-10auto merge of #6356 : dotdash/rust/strinterner, r=pcwaltonbors-69/+69
&str can be turned into @~str on demand, using to_owned(), so for strings, we can create a specialized interner that accepts &str for intern() and find() but stores and returns @~str.