about summary refs log tree commit diff
path: root/src/comp/syntax/parse
AgeCommit message (Collapse)AuthorLines
2011-11-07[Parser] parser.rs: Made two error messages less ambiguousDavid Rajchenbach-Teller-2/+6
2011-11-03Disallow writing to function arguments againMarijn Haverbeke-16/+6
Remove implicit copying hack. Closes #1118
2011-11-02Make 'lambda(...) -> ...' parse as a typeMarijn Haverbeke-22/+9
2011-10-29rustc: Support 'companion mod's for crates and directory modsBrian Anderson-8/+65
Under this scheme when parsing foo.rc the parser will also look for foo.rs to fill in the crate-level module, and when evaluating a directory module directive it will look for a .rs file with the same name as the directory.
2011-10-29stdlib: Make io failures recoverable by returning a resultBrian Anderson-2/+11
2011-10-28rustc: Remove broken --depend flagBrian Anderson-9/+0
2011-10-28Make shared kind the default only for generic functionsMarijn Haverbeke-17/+13
You almost never want a function with pinned type params. For types, objects, resources, and tags, pinned types are actually often more sane. For most of these, shared rarely makes sense. Only tricky case is objs -- you'll have to think about the kinds you want there. Issue #1076
2011-10-28Move to blocks, rather than fn@s, in parser.rsMarijn Haverbeke-16/+17
2011-10-28Move to short type parameter keywordsMarijn Haverbeke-5/+5
Issue #1076
2011-10-28Start accepting short keywords for parameter kindsMarijn Haverbeke-3/+5
This is a pre-snapshot commit to be able to implement #1076 without the bootstrap compiler getting in my way.
2011-10-25Update our code to new type parameter kind syntaxMarijn Haverbeke-7/+7
Closes #1067
2011-10-25Remove support for @/~-style type param kind annotationMarijn Haverbeke-9/+2
Issue #1067
2011-10-25Step one towards new type param kind syntaxMarijn Haverbeke-1/+5
Issue #1067 Needs a snapshot to finalize.
2011-10-21Be more careful when parsing block callsMarijn Haverbeke-1/+2
Previously, the parser would try to interpret this as a block call: if true {} // No semicolon {|i, am, a, block|}; Which, though unlikely, might come up in practice.
2011-10-21Change the way block calls are parsed, mark them as block-calls.Marijn Haverbeke-17/+18
This makes it possible to omit the semicolon after the block, and will cause the pretty-printer to properly print such calls (if pretty-printing of blocks wasn't so broken). Block calls (with the block outside of the parentheses) can now only occur at statement level, and their value can not be used. When calling a block-style function that returns a useful value, the block must be put insde the parentheses. Issue #1054
2011-10-21Drop support for iter, put, and for-eachMarijn Haverbeke-36/+11
Closes #1056
2011-10-21Support Ruby-style block argument syntaxMarijn Haverbeke-12/+21
Issue #1054
2011-10-20Remove temporary fn# syntaxBrian Anderson-15/+4
2011-10-20Don't allow fn@ itemsBrian Anderson-3/+0
fn@ is intended to be caputring but isn't implemented.
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-5/+6
Now they are both just proto_shared and proto_shared takes an argument indicating that it is sugared as 'lambda'
2011-10-20Rename ast::proto_fn to ast::proto_sharedBrian Anderson-4/+4
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-34/+76
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-27Patch to error instead of crashing when parsing unmatched double quotesWade Mealing-0/+7
Patch to error and fail instead of using all available memory then crashing to detect the error condition of an unmatched double quote before the end of a file. I couldn't get it to show nice error messages, so this may not be the ideal fix. A test case for this situation has also been added.
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-6/+10
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