about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2011-10-20Make fn denote a bare function. Convert fn to fn@ as neededBrian Anderson-10/+12
2011-10-20Parse obj methods as proto_bareBrian Anderson-10/+8
I don't know if this is the right thing to do, but it works and it lets 'fn' always mean proto_bare
2011-10-20Split parsing of fn proto between types, items and anonsBrian Anderson-6/+30
The meaning of various fn incantations is going to get temporarily confusing
2011-10-19Fail nicer when the parser doesn't find an expected string literalBrian Anderson-2/+4
Closes #1028
2011-10-18Introduce fn@ as a synonym for fnBrian Anderson-0/+3
2011-10-12make native functions markable as unsafe and incorporate thatNiko Matsakis-4/+7
into the type check
2011-10-12make treatment of unchecked/unsafe blocks more uniformNiko Matsakis-4/+6
also repair various errors in the parser related to such blocks. rename checked_blk to default_blk to reflect the fact that it inherits its purity from the surrounding context.
2011-10-12Add unsafe blocks, unsafe functions, and two rudimentary testsNiko Matsakis-1/+2
related to them
2011-10-12Extend the unchecked block stuff to allow unsafe blocks as well.Niko Matsakis-11/+22
2011-10-12expand purity to include unsafeNiko Matsakis-0/+5
2011-10-11Introduce ast::proto_bareBrian Anderson-1/+1
Issue #1022
2011-10-11Add a temporary syntax for bare functionsBrian Anderson-8/+22
Bare functions will be represented as 'fn#' until they're implemented. Then we'll switch it over to just 'fn'. Issue #1022
2011-10-07Make 1-1 parse againMarijn Haverbeke-33/+36
Issue #954 This is not a very elegant fix -- we should probably do something with constant folding to handle negative-int alt patterns in the future.
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-12/+7
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-10-06Ignore && and + before argument names.Marijn Haverbeke-1/+7
Issue #1008
2011-10-03rustc: Implement C stack stdcallPatrick Walton-0/+2
2011-09-28rustc: Add a new "C stack cdecl" native ABIPatrick Walton-1/+5
2011-09-28Revert "Revert "Implement pattern ranges for all numeric types.""Brian Anderson-2/+8
This reverts commit a034f87146e60e1db2327c6f6807c47406a1bb0b. Conflicts: src/comp/middle/check_alt.rs src/comp/middle/trans_alt.rs src/comp/syntax/ast.rs src/comp/syntax/ast_util.rs src/comp/syntax/fold.rs src/comp/syntax/print/pprust.rs Conflicts: src/comp/middle/trans_alt.rs
2011-09-24Vectors containing pinned kinds become pinnedBrian Anderson-8/+10
Otherwise they could be copied
2011-09-23Begin to support pattern matching on unique boxesBrian Anderson-0/+6
Issue #409
2011-09-23Remove backward-compatible support for 'mutable' before type.Marijn Haverbeke-8/+0
Closes #966
2011-09-21Revert "Implement pattern ranges for all numeric types."Marijn Haverbeke-8/+2
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.
2011-09-21Implement pattern ranges for all numeric types.Josh Matthews-2/+8
2011-09-20Represent unique creation as a unop in the AST instead of its own exprBrian Anderson-3/+7
Like the box unop. Issue #409
2011-09-20Parse unique box typesBrian Anderson-0/+5
Issue #409
2011-09-16Require body of else-less if expressions to be a value-less blockMarijn Haverbeke-5/+9
For consistency with other constructs that could not possibly return a value (say, loops).
2011-09-16Change convention for specifying referenced argumentMarijn Haverbeke-2/+5
It is now 1-based, rather than 0 based. (Seems more natural, and allows 0 to be used to refer to self and maybe to closure.) Also allows non-referenced args to be implicitly copied again. Issue #918
2011-09-15Prevent binary expressions from parsing when lhs is non-value blockMarijn Haverbeke-0/+1
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-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-12Factor imports mindlessly.Graydon Hoare-13/+5
2011-09-12Remove backwards-compatibility with old arg-mode syntaxMarijn Haverbeke-3/+0
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-11/+18
2011-09-12Accept {|| ... } for argument-less block syntaxMarijn Haverbeke-4/+8
Closes #880
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-161/+168
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-250/+223
2011-09-01Remove lots of estr code from rustc. Issue #855Brian Anderson-5/+3
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-14/+14
2011-09-01Parse "",str as istrs. Pretty print istrs as "",str. Issue #855Brian Anderson-2/+2
2011-09-01Remove std::str. Issue #855Brian Anderson-1/+0
2011-09-01Allow istrs as patterns. Issue #855Brian Anderson-0/+16