about summary refs log tree commit diff
path: root/src/librustsyntax
AgeCommit message (Collapse)AuthorLines
2012-05-08Import ast::* in parser.rsMarijn Haverbeke-386/+386
And make the code look a lot less awkward.
2012-05-08Start parsing pub/priv on regular itemsMarijn Haverbeke-44/+63
Issue #1893
2012-05-08parser: Consolidate some duplicated codeMarijn Haverbeke-96/+79
2012-05-07make it illegal to implicitly capture mutable variablesNiko Matsakis-15/+18
this is the final part of #1273
2012-05-04new cap clause syntaxNiko Matsakis-165/+185
2012-05-03Revert "allow fn exprs to omit arg types"Niko Matsakis-25/+31
This reverts commit 1ba4ca4c4a0153578e812baf5f7f5554d079de40.
2012-05-03allow fn exprs to omit arg typesNiko Matsakis-31/+25
also, avoid using type variables for fn args with omitted types unless necessary. This will be important for bound regions in fn types. fixes #2093
2012-05-03Comments only: annotate remaining FIXMEs in librustsyntaxTim Chevalier-3/+7
2012-04-30Stop inferring bot/static when types/regions are unconstrained.Niko Matsakis-16/+2
Also, some other changes that came up along the way: - add a 'blk' region for the current block. - detect unused type/region variables.
2012-04-30Annotate FIXME (comment only)Tim Chevalier-1/+1
2012-04-30Revert "Eliminate a copy in syntax::parse::new_parser_from_file"Tim Chevalier-23/+20
This reverts commit 2bb3b63ec4379b812aeceb690d78763ec55d3cbb. (I was confused.)
2012-04-30Eliminate a copy in syntax::parse::new_parser_from_fileTim Chevalier-20/+23
Fixing a FIXME turned out to be pretty involved. I added an io function that returns a unique boxed string (for the contents of a file) rather than a string, and went from there. Also made the src field of codemap a unique boxed string. This doesn't seem to make that much difference in amount of allocation according to valgrind (disappointingly), but I also had to introduce a copy somewhere else pending a new snapshot, so maybe that's it.
2012-04-28rustc: Use a slightly more consistent style for unexpected errorsBrian Anderson-1/+1
2012-04-27parser: More refactoring of restricted value name checkingBrian Anderson-10/+13
2012-04-27parser: Remove a restricted keyword checkBrian Anderson-1/+0
I can't find a way to trigger this error
2012-04-27test: Add test for two restricted keyword casesBrian Anderson-2/+2
2012-04-27parser: Make parse_value_path use parse_value_identBrian Anderson-7/+10
2012-04-27parser: Rewrite parse_path_without_tps so it knows beforehand which is the ↵Brian Anderson-2/+11
last ident Needed to centralize all keyword-as-value parsing in parse_value_ident
2012-04-27parser: Fix lookahead of > 1 tokenBrian Anderson-2/+2
2012-04-27syntax: Refactor ident parsingBrian Anderson-3/+3
2012-04-26Refactor operator precedence codeTim Chevalier-55/+74
Use functions instead of a dynamically created table to determine operator precedence. Gets rid of a FIXME in syntax::parse::prec. Change precedences from int to uint while we're at it, since don't use negative precedences.
2012-04-25lots of work to make iface/impls parameterized by regionsNiko Matsakis-143/+204
- paths can now take region parameters, replacing the dirty hack I was doing before of abusing vstores. vstores are now a bit of a hack though. - fix various small bugs: - we never checked that iface types were compatible when casting to an iface with `as` - we allowed nonsense like int<int> - and more! (actually that may be it)
2012-04-25Rewrite exhaustiveness checkerMarijn Haverbeke-2/+0
Issue #2111
2012-04-24syntax: Divide keywords into contextual/restricted. No bad wordsBrian Anderson-31/+62
2012-04-24syntax: Make 'true' and 'false' bad wordsBrian Anderson-5/+3
When these are idents they are always shadowed by the boolean constants.
2012-04-24syntax: Clean up the bad_expr_word functionsBrian Anderson-20/+17
2012-04-24syntax: Rename is_word to is_keyword, etc.Brian Anderson-92/+97
2012-04-23Allow classes to be cast to ifaces that are in the same crateTim Chevalier-25/+41
I had to xfail one existing test case (class-implements-int) because, I think, of the same bug described in #2272.
2012-04-23Rename option::get_or_default to get_default, for consistencyTim Chevalier-1/+1
2012-04-23Move map iface over to more `for`-friendly iteration methodsMarijn Haverbeke-3/+3
2012-04-23Simplify representation of ast::pathMarijn Haverbeke-146/+119
2012-04-23pretty printer: Properly print explicity types for block paramsMarijn Haverbeke-0/+4
2012-04-22syntax: Replace token::DOLLAR_PAREN, DOLLAR_NUM with just DOLLARBrian Anderson-37/+23
Figure the rest out in the parser
2012-04-22syntax: Eliminate token::POUND_LT, POUND_LBRACEBrian Anderson-16/+9
Use lookahead in the parser
2012-04-22syntax: Move is_lit to mod tokenBrian Anderson-11/+11
2012-04-22syntax: Remove unused BRACEQUOTE, IDX, LIT_BOOL tokensBrian Anderson-7/+0
2012-04-21syntax: Eliminate 'mutable' keyword. Closes #2254Brian Anderson-2/+2
2012-04-20Add new syntax for patterns that match the head constructor onlyTim Chevalier-21/+43
Adds a new kind of pattern C(*) where C is a constructor that may have any number of fields. This pattern matches any value constructed with C, without binding names for any of the fields. Closes #1701.
2012-04-19syntax: Reorganize mod parseBrian Anderson-75/+77
2012-04-19syntax: Move fn spanned into ast_utilBrian Anderson-9/+8
2012-04-19syntax: Extract some functions into mod commonBrian Anderson-206/+208
2012-04-19syntax: Extract attribute parsing to its own modBrian Anderson-115/+139
2012-04-19update syntax to include a slashNiko Matsakis-2/+7
2012-04-19make nominal types optionally parameterized by a self region.Niko Matsakis-47/+84
Issue #2201.
2012-04-19Annotate FIXMEs in parserTim Chevalier-29/+26
Also, get rid of two FIXMEs by refactoring some code, and moving the call_expr check for be expressions into typeck, where it seems to make more sense.
2012-04-19syntax: Funnel all words through a single keyword tableBrian Anderson-10/+53
2012-04-19Disallow rebinding / matching against consts in altsTim Chevalier-3/+2
As per Issue #1193. Closes #1193. I had to rename a few variables ("info" and "epsilon") to avoid clashing with in-scope constants, which is responsible for all the changes other than resolve and issue-1193.rs.
2012-04-19Annotate FIXMEs (comments only)Tim Chevalier-5/+9
2012-04-19Move some functions from pprust to classifyTim Chevalier-55/+54
As per a FIXME in syntax::parse::classify, move predicates on exprs and stmts into classify, out of pprust
2012-04-19Clean up FIXMEs in syntax::foldTim Chevalier-5/+23
Eta-reduce a function, fold over ty constrs, and annotate a FIXME.