about summary refs log tree commit diff
path: root/src/comp/syntax/parse
AgeCommit message (Collapse)AuthorLines
2011-09-15Require the parameter that will be referenced to be notedMarijn Haverbeke-4/+17
Issue #918
2011-09-15Add representation for by-ref let bindingsMarijn Haverbeke-4/+6
Issue #918
2011-09-15Introduce new semicolon rulesMarijn Haverbeke-71/+44
- Loop bodies and resource constructors aren't allowed to have trailing expressions anymore. - An expression that ends* in a block without trailing expression can can not be called, indexed, or subscripted. - Only expression-statements that end* in a block without trailing expression can omit their semicolon. *) 'Ending in a trailing expression' is defined as being a block or construct-ending-in-a-block (if, alt) that either ends in an expression itself, or ends in another block-like expression that has a trailing expression (by these same rules).
2011-09-14Add syntax and representation for return-by-mutably-rooted-refMarijn Haverbeke-1/+1
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
2011-09-14Refactor parse_ret_ty, start parsing by-alias return specsMarijn Haverbeke-50/+23
2011-09-14Rename ast::controlflow to ast::ret_styleMarijn Haverbeke-7/+12
It will include information about returning by alias.
2011-09-14Add support for negative literals.Josh Matthews-6/+25
2011-09-13Improve lexing of float literalsMarijn Haverbeke-39/+36
Closes #575
2011-09-13Be more strict about what constitutes a block expressionMarijn Haverbeke-6/+35
Blocks (or statements involving blocks) that end in a semicolon are no longer considered the block-expression of their outer block. This used to be an expression block, but now is a statement block: { if foo { ret 1; } else { ret 10; } } This helps clear up some ambiguities in our grammar.
2011-09-12Kill trailing whitespace.Graydon Hoare-1/+1
2011-09-12Factor imports mindlessly.Graydon Hoare-33/+13
2011-09-12Remove backwards-compatibility with old arg-mode syntaxMarijn Haverbeke-3/+0
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-22/+31
2011-09-12Accept {|| ... } for argument-less block syntaxMarijn Haverbeke-4/+8
Closes #880
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-194/+206
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-12Make the names of the arg mode tag reflect their (revised) meaningMarijn Haverbeke-9/+7
2011-09-09Add missing arm, so pretty-printing the statement 'copy 1;' does not die.Jesse Ruderman-0/+1
2011-09-02Rename ty_istr to ty_str. Issue #855Brian Anderson-1/+1
2011-09-02Stop parsing transitional istr forms. Issue #855Brian Anderson-24/+1
2011-09-02Reformat. Issue #855Brian Anderson-418/+357
2011-09-01Remove lots of estr code from rustc. Issue #855Brian Anderson-5/+3
2011-09-01Convert all uses of #ifmt to #fmt. Issue #855Brian Anderson-5/+5
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-46/+46
2011-09-01Parse "",str as istrs. Pretty print istrs as "",str. Issue #855Brian Anderson-2/+2
2011-09-01Remove std::str. Issue #855Brian Anderson-4/+0
2011-09-01Allow istrs as patterns. Issue #855Brian Anderson-0/+16
2011-09-01Make resolve recognize upvarsMarijn Haverbeke-1/+0
Upvars are now marked with def_upvar throughout, not just when going through freevars::lookup_def. This makes things less error-prone. One thing to watch out for is that def_upvar is used in `for each` bodies too, when they refer to a local outside the body.
2011-08-31Convert uses of #fmt to #ifmt. Issue #855Brian Anderson-8/+7
2011-08-29Implement non-internal ivecsMarijn Haverbeke-4/+2
Vectors are now similar to our old, pre-internal vectors, except that they are uniquely owned, not refcounted. Their name should probably change too, then. I've renamed them to vec in the runtime, will do so throughout the compiler later.
2011-08-27Convert rustc::syntax::codemap to istrs. Issue #855Brian Anderson-5/+5
2011-08-27Convert rustc::syntax::ast_util to istrs. Issue #855Brian Anderson-2/+2
2011-08-27Convert parser to istrs. Issue #855Brian Anderson-203/+204
2011-08-27Convert rustc::syntax::eval to istrs. Issue #855Brian Anderson-14/+15
2011-08-27Convert rustc::syntax::token to istrs. Issue #855Brian Anderson-75/+79
2011-08-27Convert lexer to istrs. Issue #855Brian Anderson-93/+120
2011-08-27Convert rest of the AST to istrs. Issue #855Brian Anderson-6/+10
2011-08-27Convert ast::ident to istr. Issue #855Brian Anderson-27/+52
2011-08-27Convert std::map::new_str_hash to istrs. Issue #855Brian Anderson-43/+44
2011-08-27Convert std::io to istrs. Issue #855Brian Anderson-1/+1
2011-08-27Convert std::fs to istrs. Issue #855Brian Anderson-7/+12
2011-08-27Convert std::int to istrs. Issue #855Brian Anderson-3/+3
2011-08-27Convert std::uint to istrs. Issue #855Brian Anderson-1/+2
2011-08-25Remove remaining use of 'pred' and make 'pred' a non-reserved word. Huzzah\!Tim Chevalier-6/+0
2011-08-25Remove typestate workaround that's no longer necessaryTim Chevalier-4/+1
2011-08-25Support unchecked blocksTim Chevalier-7/+19
This patch supports the syntax unchecked { ... } to disable purity checking within a block. Presumably it will only be used within a declared "pure fn". However, there is no checking that it doesn't occur elsewhere, and it would be harmless for it to do so. I went with Lindsey's suggestion for the syntax, but it's subject to change. This allows you to write code that uses predicates that call arbitrary Rust functions, but you must declare your intentions by wrapping it in an unchecked { ... } block. The test case run-pass/unchecked-predicates.rs demonstrates how to do that.
2011-08-25Change "pred" to "pure fn" within the compiler.Tim Chevalier-1/+1
2011-08-24hmm, this should have been in the last commit. Oops.Tim Chevalier-0/+1
2011-08-24Change "pred" to "pure fn" (but still accept "pred")Tim Chevalier-4/+8
This is part 1 of changing the "pred" keyword to "pure fn". Right now, the compiler accepts both "pred" and "pure fn".
2011-08-23Add kind-checking for assign-op, copy, ret, be, fail exprs. Fix caught ↵Graydon Hoare-1/+1
kinding-violations in rustc and libstd.
2011-08-23Fix pretty-printing of istr literals. Issue #855Brian Anderson-1/+2