about summary refs log tree commit diff
path: root/src/comp/syntax/parse/parser.rs
AgeCommit message (Collapse)AuthorLines
2011-11-24rustc: Add a path attribute for crate directivesHaitao Li-9/+2
The path information was an optional "filename" component of crate directive AST. It is now replaced by an attribute with metadata named "path". With this commit, a directive mod foo = "foo.rs"; should be written as: #[path = "foo.rs"] mod foo; Closes issue #906.
2011-11-24rustc: Accepts `path` attributes for crate directivesHaitao Li-1/+3
Temporarily allow path specified in either as attribute or in AST, like: #[path = "mymod.rs"] mod mymod = "mymod.rs"; This is a transitional commit to avoid creating a stage1 snapshot.
2011-11-23Allow import directives in any blockMarijn Haverbeke-3/+4
Closes #49
2011-11-23Rollback return-by-referenceMarijn Haverbeke-26/+4
It's proving too inflexible, so I'm ripping out the extra complexity in the hope that regions will, at some point, provide something similar. Closes #918
2011-11-23Remove last traces of auth keywordMarijn Haverbeke-13/+0
The reference now has an empty hole where the auth keyword used to be. Changing the keyword table seems to require manually sorting the keywords and putting them back into some kind of arcane interleaved order. I'll open an issue to actually fix this. Closes #1211
2011-11-22rustc: Allow trailing comma in record fieldsHaitao Li-28/+48
2011-11-22comp: allowed the declaration of pure fn's in native modsStefan Plantikow-0/+3
This is especially useful for the native calls in std::math This commit does NOT yet point to new snapshots
2011-11-22Add hacks to extract and compile tutorial codeMarijn Haverbeke-10/+0
Not included in the build by default, since it's fragile and kludgy. Do something like this to run it: cd doc/tutorial RUSTC=../../build/stage2/bin/rustc bash test.sh Closes #1143
2011-11-21rustc: Remove abi from ast::native_modHaitao Li-22/+3
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-35/+30
This involved adding 'copy' to more generics than I hoped, but an experiment with making it implicit showed that that way lies madness -- unless enforced, you will not remember to mark functions that don't copy as not requiring copyable kind. Issue #1177
2011-11-18Add a pass-by-copy parameter passing conventionMarijn Haverbeke-1/+4
This is intended to solve the problem of how to pass arguments to constructor functions -- you want to move in rvalues, but not have to explicitly copy stuff that is not an rvalue. The by-copy passing convention will ensure the callee gets its own copy of the value. For rvalues, it'll just pass off the value. For lvalues, it'll make a copy. Issue #1177
2011-11-18Preparation for kind system overhaulMarijn Haverbeke-13/+16
This goes before a snapshot, so that subsequenct patches can make the transition without breaking the build. Disables kind checking pass, makes parser accept both new and old-style kind annotation. Issue #1177
2011-11-17remove compile-command from local variable blocksNiko Matsakis-1/+0
2011-11-16Replace 'mutable?' with 'const'Brian Anderson-2/+1
2011-11-16rustc: Accept 'const' as synonym for 'mutable?'Brian Anderson-3/+6
2011-11-16Use attributes for native module ABI and link nameHaitao Li-46/+20
This patch changes how to specify ABI and link name of a native module. Before: native "cdecl" mod llvm = "rustllvm" {...} After: #[abi = "cdecl"] #[link_name = "rustllvm"] native mod llvm {...} The old optional syntax for ABI and link name is no longer supported. Fixes issue #547
2011-11-16Use attributes for native module ABI and link name [temp]Haitao Li-1/+25
This patch adds support of using attributes to specify native mode ABI and link name. The old optional syntax like: native "cdecl" mod llvm = "rustllvm" { ... } is still supported. This is a transitional commit to avoid making a stage1 (backward imcompatible) snapshot.
2011-11-16rustc: Use link_name attribute for native functionHaitao Li-3/+1
Fixes issue #906
2011-11-10Cleanup unused importsHaitao Li-1/+0
2011-11-09Rename "c-stack-stdcall" ABI to "stdcall"Brian Anderson-2/+0
2011-11-09Rename "c-stack-cdecl" ABI to "cdecl"Brian Anderson-2/+0
2011-11-09Add "cdecl" as synonym for "c-stack-cdecl"Brian Anderson-0/+2
2011-11-09Add "stdcall" as synonym for "c-stack-stdcall"Brian Anderson-0/+2
2011-11-09rustc: Rename native_abi_c_stack_cdecl to native_abi_cdeclBrian Anderson-2/+2
2011-11-09rustc: Rename native_abi_c_stack_stdcall to native_abi_stdcallBrian Anderson-1/+1
2011-11-09Remove native "x86stdcall" ABIBrian Anderson-2/+0
2011-11-08Remove native "cdecl" ABIBrian Anderson-3/+2
2011-11-07Remove native "llvm" ABIBrian Anderson-2/+0
2011-11-07Remove native "rust" ABIBrian Anderson-2/+0
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-0/+1
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-3/+5
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-3/+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