about summary refs log tree commit diff
path: root/src/comp/syntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2011-12-16Reserve node_id 0 for the crate top-level moduleMarijn Haverbeke-0/+1
And define a const to refer to it.
2011-12-16Make polymorphic impl methods workMarijn Haverbeke-1/+1
Something will still have to be done to the AST to make it possible to say `x.foo::<int>()`, since currently field access never allows type parameters. Issue #1227
2011-12-16Change syntax for implMarijn Haverbeke-1/+1
Move the name of the bundle to the front, allow type parameters (not handled yet), and add a 'for' keyword: impl utils for int { fn str() -> str { int::str(self) } fn times(f: block()) { ... } }
2011-12-16Make uses of self in impls compileMarijn Haverbeke-2/+1
Get rid of expr_self_call, introduces def_self. `self` is now, syntactically, simply a variable. A method implicitly brings a `self` binding into scope. Issue #1227
2011-12-16Parse and resolve implementations.Marijn Haverbeke-3/+3
Issue #1227
2011-12-15massive refactor of how closures workNiko Matsakis-0/+9
2011-12-14change syntax from lambda[send] to sendfnNiko Matsakis-1/+0
2011-12-14push changes through to get things compiling, if not running.Niko Matsakis-0/+19
2011-12-14first attempt, not happy with itNiko Matsakis-2/+2
2011-12-14define ty and update parser for sendable lambdasNiko Matsakis-1/+11
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+1
2011-12-08Allow binding of nested patternsMarijn Haverbeke-1/+1
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is boundvar@subpattern Which will match the subpattern as usual, but also bind boundvar to the whole matched value. Closes #838
2011-12-07Inject the view_items for core in the right place, add comment documenting ↵Graydon Hoare-0/+7
why the wrong place was wrong.
2011-12-07Remove stmt_crate_directive, it's vestigial and confusing.Graydon Hoare-3/+0
2011-12-07Change literal representation to not truncateMarijn Haverbeke-28/+12
Also shuffles around the organization of numeric literals and types, separating by int/uint/float instead of machine-vs-non-machine types. This simplifies some code. Closes #974 Closes #1252
2011-12-02Allow literal patterns to contain arbitrary literal expressionsMarijn Haverbeke-2/+2
This removes the need for the unary minus hacks, and allows some other neat things like matching on 1 >> 4. Issue #954
2011-11-30Box ast::path valuesMarijn Haverbeke-11/+11
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-24rustc: Add a path attribute for crate directivesHaitao Li-2/+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-23Allow import directives in any blockMarijn Haverbeke-3/+2
Closes #49
2011-11-23Rollback return-by-referenceMarijn Haverbeke-1/+0
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-3/+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-21rustc: Remove abi from ast::native_modHaitao Li-3/+1
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-3/+1
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/+1
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-2/+3
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-16Use attributes for native module ABI and link nameHaitao Li-1/+1
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-16rustc: Use link_name attribute for native functionHaitao Li-1/+1
Fixes issue #906
2011-11-09rustc: Rename native_abi_c_stack_cdecl to native_abi_cdeclBrian Anderson-1/+1
2011-11-09rustc: Rename native_abi_c_stack_stdcall to native_abi_stdcallBrian Anderson-1/+1
2011-11-09Remove native "x86stdcall" ABIBrian Anderson-1/+0
2011-11-08Remove native "cdecl" ABIBrian Anderson-1/+0
2011-11-07Remove native "llvm" ABIBrian Anderson-1/+0
2011-11-07Remove native "rust" ABIBrian Anderson-1/+0
2011-10-28Make shared kind the default only for generic functionsMarijn Haverbeke-12/+7
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-21Change the way block calls are parsed, mark them as block-calls.Marijn Haverbeke-1/+1
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-3/+0
Closes #1056
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-4/+7
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-3/+2
2011-10-12make native functions markable as unsafe and incorporate thatNiko Matsakis-1/+1
into the type check
2011-10-12make treatment of unchecked/unsafe blocks more uniformNiko Matsakis-1/+1
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-12Extend the unchecked block stuff to allow unsafe blocks as well.Niko Matsakis-3/+6
2011-10-12expand purity to include unsafeNiko Matsakis-0/+1
2011-10-11Introduce ast::proto_bareBrian Anderson-1/+9
Issue #1022
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-1/+1
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-10-03rustc: Implement C stack stdcallPatrick Walton-0/+1
2011-09-28rustc: Add a new "C stack cdecl" native ABIPatrick Walton-0/+1
2011-09-28Revert "Revert "Implement pattern ranges for all numeric types.""Brian Anderson-0/+1
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-23Begin to support pattern matching on unique boxesBrian Anderson-0/+1
Issue #409
2011-09-21Revert "Implement pattern ranges for all numeric types."Marijn Haverbeke-1/+0
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.