about summary refs log tree commit diff
path: root/src/rustc/syntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2012-03-29rustc: Move ast, ast_util, visit to rustsyntaxBrian Anderson-716/+0
2012-03-29Require "self" as base expression for intra-class method or field referencesTim Chevalier-5/+0
All field or method references within a class must begin with "self." now. A bare reference to a field or method in the same class will no longer typecheck.
2012-03-28Allow explicit self-calls within classesTim Chevalier-9/+8
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-0/+1
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-27Support returning from loop blocksMarijn Haverbeke-0/+3
The code is somewhat invasive, but it seems hard to do this in a clean way, since the design itself involves a bunch of 'action at a distance'. Issue #1819
2012-03-27Support an alternate for syntax that calls a higher-order functionMarijn Haverbeke-0/+1
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-1/+1
2012-03-23Remove last vestiges of old-style intrinsicsMarijn Haverbeke-1/+0
Closes #2048
2012-03-23Revert removal of intrinsicsMarijn Haverbeke-0/+1
Oops. We can't do this yet until the next snapshot.
2012-03-23Rename builtin back to intrinsicMarijn Haverbeke-1/+1
As per Graydon's request Issue #1981
2012-03-23Remove support for the old-style intrinsicsMarijn Haverbeke-1/+0
Closes #2042 Closes #1981
2012-03-23Implement built-in native modules as an alternative to intrinsicsMarijn Haverbeke-1/+3
Issue #1981
2012-03-20Implement an initial version of placement new.Niko Matsakis-0/+4
2012-03-20Class methods WIPTim Chevalier-2/+2
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-15switch over to using new serialize/deserialize codeNiko Matsakis-106/+106
2012-03-14fix auto_serialize for enums with type parametersNiko Matsakis-2/+146
2012-03-13Name types after their modules instead of 't'Brian Anderson-2/+2
2012-03-12rustc: Add node IDs to AST types so we can associate them with region ↵Patrick Walton-1/+1
environments
2012-03-12Revert "rustc: Add node IDs to AST types so we can associate them with ↵Patrick Walton-1/+1
region environments" This reverts commit 96e1bbd4a0abd2c8e76e7e02b396c5319dea7a8d.
2012-03-12rustc: Add node IDs to AST types so we can associate them with region ↵Patrick Walton-1/+1
environments
2012-03-09Add an infinite loop constructTim Chevalier-0/+4
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-1/+3
2012-03-09rustc: Add region def ids to the ASTPatrick Walton-1/+2
2012-03-09Revert "rustc: Create def IDs for region parameters"Patrick Walton-5/+2
This reverts commit 0d4cb759494f9589ba57c4f2c41f5a5737ab74e0.
2012-03-09rustc: Create def IDs for region parametersPatrick Walton-2/+5
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-08Explicitly store self_ids use for self locals in methodsMarijn Haverbeke-1/+1
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: Add the safe address-of operator to the ASTPatrick Walton-1/+1
2012-03-08rustc: Add region-annoted type parameters to the AST; stub associated patternsPatrick Walton-0/+7
2012-03-04Translate simple classesTim Chevalier-6/+6
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/+553