about summary refs log tree commit diff
path: root/src/rustc/syntax/parse
AgeCommit message (Collapse)AuthorLines
2012-03-29rustc: Move attr, parse, print to rustsyntaxBrian Anderson-2986/+0
2012-03-29rustc: Move lexer and token to rustsyntaxBrian Anderson-948/+0
2012-03-28Allow explicit self-calls within classesTim Chevalier-36/+21
Allow writing self.f() within a class that has a method f. In a future commit, this syntax will be required. For now, you can write either self.f() or f(). I added a "privacy" field to all methods (whether class methods or not), which allowed me to refactor the AST somewhat (getting rid of the class_item type; now there's just class_member).
2012-03-28Allow references to "self" within classesTim Chevalier-1/+3
Allow writing self.f within a class that has a field f. Currently, the compiler accepts either self.f or f. In a future commit I'll require writing self.f and not f. Not sure whether self.f() works if f is a method (making sure that works next).
2012-03-27Enforce mutability declarations in classes; correct shapes for classesTim Chevalier-2/+2
1. Enforce mutability declarations on class fields. Don't allow any mutation of class fields not declared as mutable (except inside the constructor). 2. Handle classes correctly in shape (treat classes like records).
2012-03-27Support an alternate for syntax that calls a higher-order functionMarijn Haverbeke-7/+31
The last argument of the call must be a block, and the type of this argument must a function returning bool. `break` and `cont` are supported in the body of the block, and return `false` or `true` from the function. When the end of the function is reached, `true` is implicitly returned. for vec::all([1, 2, 3]) {|elt| if elt == 2 { break; } log(error, elt); } Issue #1619
2012-03-26Bulk-edit mutable -> mut.Graydon Hoare-24/+24
2012-03-26rustc: "unkown" -> "unknown"Patrick Walton-1/+1
2012-03-23rustc: Fix parsing of `ret &EXPR`Patrick Walton-0/+1
The parser didn't think that `&` could start an expression.
2012-03-21add mut decls to rustc and make them mandatoryNiko Matsakis-125/+130
2012-03-20Implement an initial version of placement new.Niko Matsakis-1/+8
2012-03-20Class methods WIPTim Chevalier-17/+15
In particular, use the ast::method type to represent a class method, and try to reuse as much iface code as possible. (This makes sense now since I'll be allowing polymorphic class methods.)
2012-03-20rustc: Be more careful about spans in 'unexpected token' errorsMarijn Haverbeke-9/+12
Closes #2017
2012-03-20Revert order of arguments to option::maybe and from_maybeMarijn Haverbeke-1/+1
Closes #2019
2012-03-16core: Store reexporting result and either. Closes #1997Brian Anderson-1/+2
2012-03-14std: Rename the hashmap constructors to conform to new standardsBrian Anderson-2/+2
Instead of using the new_ prefix just name them after their type
2012-03-13Name types after their modules instead of 't'Brian Anderson-2/+2
2012-03-12Libc/os/run/rand/io reorganization. Close #1373. Close #1638.Graydon Hoare-12/+7
- Move io, run and rand to core. - Remove incorrect ctypes module (use libc). - Remove os-specific modules for os and fs. - Split fs between core::path and core::os.
2012-03-12rustc: Add node IDs to AST types so we can associate them with region ↵Patrick Walton-19/+43
environments
2012-03-12Revert "rustc: Add node IDs to AST types so we can associate them with ↵Patrick Walton-43/+19
region environments" This reverts commit 96e1bbd4a0abd2c8e76e7e02b396c5319dea7a8d.
2012-03-12rustc: Add node IDs to AST types so we can associate them with region ↵Patrick Walton-19/+43
environments
2012-03-10Use loop instead of while(true) in libraries and compiler itselfTim Chevalier-17/+13
And remove spurious fails/unreachable() calls.
2012-03-09Add an infinite loop constructTim Chevalier-6/+15
Add a loop {} construct for infinite loops, and use it in test cases. See #1906 for details.
2012-03-09rustc: Wrap regions in a node IDPatrick Walton-2/+3
2012-03-09Revert "rustc: Create def IDs for region parameters"Patrick Walton-1/+1
This reverts commit 0d4cb759494f9589ba57c4f2c41f5a5737ab74e0.
2012-03-09rustc: Create def IDs for region parametersPatrick Walton-1/+1
2012-03-08rustc: Change the address-of operator to an explicit production so that we ↵Patrick Walton-1/+2
can parse the mutability
2012-03-08Change util::unreachable to core::unreachableTim Chevalier-1/+1
Closes #1931
2012-03-08Explicitly store self_ids use for self locals in methodsMarijn Haverbeke-1/+2
This makes it possible to move them between crates without confusion, and to instantiate them at a point where the monomorphizing substitutions are known. Issue #1944
2012-03-08rustc: Parse the safe address-of operatorPatrick Walton-0/+6
2012-03-08rustc: Parse region typesPatrick Walton-0/+20
2012-03-05rustc: Lower case error messagesBrian Anderson-3/+5
2012-03-04Translate simple classesTim Chevalier-19/+28
Programs using classes with fields only (no methods) compile and run, as long as nothing refers to a class in a different crate (todo). Also changed the AST representation of classes to have a separate record for constructor info (instead of inlining the fields in the item_class node), and fixed up spans and pretty-printing for classes.
2012-03-02Move src/comp to src/rustcGraydon Hoare-0/+3844