summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-06-08auto merge of #7004 : dotdash/rust/allocs, r=thestingerbors-44/+60
This removes some unnecessary allocations in the lexer, the typechecker and the metadata decoder. Reduces the time spent in the parsing and typechecking passes by about 10% for me.
2013-06-09remove unused import warningsHuon Wilson-4/+1
2013-06-09std: remove each_char* fns and methods from str, replaced by iterators.Huon Wilson-2/+3
2013-06-08Lexer: Fix offset handling in get_str_from()Björn Steinbrink-10/+8
As the comment said, the subtraction is bogus for multibyte characters. Fortunately, we can just use last_pos instead of pos to get the correct position without any subtraction hackery.
2013-06-08Lexer: Avoid unnecessary allocationsBjörn Steinbrink-42/+57
2013-06-08Avoid unnecessary (re-)allocations in the lexerBjörn Steinbrink-7/+8
2013-06-06auto merge of #6982 : Aatch/rust/better-foreign-error, r=pcwaltonbors-2/+2
I encountered this. A straight fail is not useful and most people aren't going to happily spelunk in `parser.rs`
2013-06-07Provide an actual error when expanding macros to foreign itemsJames Miller-2/+2
2013-06-06Clean up a handful of build warnings.Michael Sullivan-2/+2
2013-06-06Deduplicate words in code commentsAlexei Sholik-1/+1
2013-06-05added fresh-name fnJohn Clements-0/+28
2013-06-05add hygiene support functionsJohn Clements-22/+12
2013-06-05remove unused get_ident_interner'sJohn Clements-1/+2
2013-06-05removed unused imports (and one unused argument)John Clements-6/+3
2013-06-05remove interner field from string_readerJohn Clements-28/+16
2013-06-05remove interner from tt_readerJohn Clements-1/+0
2013-06-05token_to_ident takes argument by referenceJohn Clements-7/+7
2013-06-05interner just uses uints, not idents with syntax contextJohn Clements-49/+71
2013-06-05removed some interner fieldsJohn Clements-9/+0
2013-06-05just use TLS internerJohn Clements-25/+29
2013-06-05rename repr to nameJohn Clements-82/+82
2013-06-05change to newer macro escape mechanism, using uints in more placesJohn Clements-13/+28
2013-06-04librustc: Disallow multiple patterns from appearing in a "let" declaration.Patrick Walton-11/+27
You can still initialize multiple variables at once with "let (x, y) = (1, 2)".
2013-06-04libsyntax: Remove `pub impl` from the languagePatrick Walton-11/+9
2013-06-01syntax: move callee_id into the expr_ variantsErick Tryzelaar-38/+60
2013-06-01Remove all uses of `pub impl`. rs=stylePatrick Walton-184/+177
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