about summary refs log tree commit diff
path: root/src/comp/syntax/print/pprust.rs
AgeCommit message (Collapse)AuthorLines
2011-12-18Only look for a matching method when normal field access failsMarijn Haverbeke-5/+3
We should probalby warn when defining a method foo on {foo: int} etc. This should reduce the amount of useless typevars that are allocated. Issue #1227
2011-12-16Change syntax for implMarijn Haverbeke-9/+6
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-4/+0
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-0/+16
Issue #1227
2011-12-14change syntax from lambda[send] to sendfnNiko Matsakis-1/+1
2011-12-14push changes through to get things compiling, if not running.Niko Matsakis-0/+1
2011-12-14first attempt, not happy with itNiko Matsakis-1/+1
2011-12-13Copy first batch of material from libstd to libcore.Graydon Hoare-1/+2
2011-12-08Allow binding of nested patternsMarijn Haverbeke-1/+7
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-07Change literal representation to not truncateMarijn Haverbeke-22/+19
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-3/+3
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-9/+9
It seems inefficient to copy them around. Let's measure whether that's actually > the case
2011-11-23Add some changes that *should* have been in e98286b594Marijn Haverbeke-0/+1
Forgot to amend the commit after fixing the failure.
2011-11-23Rollback return-by-referenceMarijn Haverbeke-21/+2
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-22rustc: Allow trailing comma in record fieldsHaitao Li-2/+2
2011-11-18Update stdlib, compiler, and tests to new kind systemMarijn Haverbeke-5/+4
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/+2
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-3/+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-16Replace 'mutable?' with 'const'Brian Anderson-1/+1
2011-11-16rustc: Accept 'const' as synonym for 'mutable?'Brian Anderson-1/+1
2011-11-16Use attributes for native module ABI and link nameHaitao Li-16/+0
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-5/+1
Fixes issue #906
2011-11-10Cleanup unused importsHaitao Li-2/+1
2011-11-09Add "cdecl" as synonym for "c-stack-cdecl"Brian Anderson-1/+1
2011-11-09Add "stdcall" as synonym for "c-stack-stdcall"Brian Anderson-1/+1
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-4/+5
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 short type parameter keywordsMarijn Haverbeke-2/+2
Issue #1076
2011-10-25Step one towards new type param kind syntaxMarijn Haverbeke-2/+2
Issue #1067 Needs a snapshot to finalize.
2011-10-21Change the way block calls are parsed, mark them as block-calls.Marijn Haverbeke-4/+12
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-19/+3
Closes #1056
2011-10-20Merge ast::proto_shared and ast::proto_closureBrian Anderson-3/+3
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-1/+1
2011-10-20Make fn denote a bare function. Convert fn to fn@ as neededBrian Anderson-7/+7
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/+7
2011-10-11Introduce ast::proto_bareBrian Anderson-0/+1
Issue #1022
2011-10-10Adjust function signatures to allow for vecs being immediateMarijn Haverbeke-1/+1
Some code was relying on vectors being implicitly by-reference (as non-immediate value). This adds the necessary &&-sigils. Closes #1021
2011-10-07Parse and typecheck by-value and by-ref arg specsMarijn Haverbeke-14/+16
Add sprinkle && throughout the compiler to make it typecheck again. Issue #1008
2011-10-03rustc: Implement C stack stdcallPatrick Walton-0/+3
2011-09-28rustc: Add a new "C stack cdecl" native ABIPatrick Walton-0/+3
2011-09-28Revert "Revert "Implement pattern ranges for all numeric types.""Brian Anderson-0/+6
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-26Make return-by-ref function headers pretty-print safelyMarijn Haverbeke-1/+1
Closes #972
2011-09-23Begin to support pattern matching on unique boxesBrian Anderson-0/+1
Issue #409