summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2013-09-11more helpful error message for ident comparison failureJohn Clements-1/+2
2013-09-11Properly encode/decode structural variants.SiegeLord-1/+1
2013-09-11Flag unsafe blocks from format! as compiler-generatedAlex Crichton-1/+7
2013-09-11Implement the notion of a "generated unsafe block"Alex Crichton-1/+1
This way syntax extensions can generate unsafe blocks without worrying about them generating unnecessary unsafe warnings. Perhaps a special keyword could be added to be used in macros, but I don't think that's the best solution.
2013-09-10change type of ExprLoop and ExprBreak elts from ident->name.John Clements-2/+4
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10auto merge of #9088 : nikomatsakis/rust/issue-6304-AST-tree-not-DAG, ↵bors-0/+5
r=catamorphism Ensures that each AST node has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-0/+5
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-09undo cowardly hiding of eq-checkJohn Clements-13/+2
I've reversed my thinking on this restrictive definition of eq after two separate bugs were hidden by commenting it out; it's better to get ICEs than SIGSEGV's, any day. RE-ENABLING ICE MACHINE!
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-1/+3
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-08syntax: implement labelled breaks for `for`.Huon Wilson-1/+1
`for` desugars to `loop` so it is trivial to just desugar to `loop` while retaining any label.
2013-09-06commentsJohn Clements-0/+9
2013-09-06whitespace, reindentation, and comments onlyJohn Clements-1/+7
2013-09-06WIP: adding context to macrosJohn Clements-1/+1
2013-09-06add temporarily unused ctxt field to mac_invoc_ttJohn Clements-1/+1
2013-09-06commentsJohn Clements-0/+1
2013-09-06added FIXME commentJohn Clements-0/+4
2013-09-06comments onlyJohn Clements-0/+1
2013-09-06comments in ast.rsJohn Clements-0/+5
2013-09-06add hygiene support fns, move them around.John Clements-1/+1
also adds test cases
2013-09-06commenting out special Eq implementation for nowJohn Clements-2/+13
See the comments for details on why I'm leaving this code in, though commented out.
2013-09-06disallow ident equality checks when contexts are not equalJohn Clements-1/+14
2013-09-05Remove the __log function for __log_levelAlex Crichton-1/+3
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-04stop treating char as an integer typeDaniel Micay-1/+2
Closes #7609
2013-09-03Modernized a few more types in syntax::astMarvin Löbel-163/+163
2013-09-02Renamed syntax::ast::ident -> IdentMarvin Löbel-31/+33
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-32/+32
2013-08-28auto merge of #8718 : bblum/rust/typeof, r=pcwaltonbors-0/+1
r? anybody
2013-08-27librustc: Ensure that type parameters are in the right positions in paths.Patrick Walton-4/+8
This removes the stacking of type parameters that occurs when invoking trait methods, and fixes all places in the standard library that were relying on it. It is somewhat awkward in places; I think we'll probably want something like the `Foo::<for T>::new()` syntax.
2013-08-27librustc: Add support for type parameters in the middle of paths.Patrick Walton-6/+15
For example, `foo::<T>::bar::<U>`. This doesn't enforce that the type parameters are in the right positions, however.
2013-08-27librustc: Remove `&const` and `*const` from the language.Patrick Walton-1/+4
They are still present as part of the borrow check.
2013-08-27Remove remnants of implicit selfNiko Matsakis-1/+1
2013-08-23Parse and reserve typeof keyword. #3228Ben Blum-0/+1
2013-08-16doc: convert remaining uses of core:: to std::.Huon Wilson-3/+3
2013-08-09std/rustc/rustpkg/syntax: Support the `extern mod = ...` formTim Chevalier-1/+5
This commit allows you to write: extern mod x = "a/b/c"; which means rustc will search in the RUST_PATH for a package with ID a/b/c, and bind it to the name `x` if it's found. Incidentally, move get_relative_to from back::rpath into std::path
2013-08-05Updated std::Option, std::Either and std::ResultMarvin Löbel-2/+2
- Made naming schemes consistent between Option, Result and Either - Changed Options Add implementation to work like the maybe monad (return None if any of the inputs is None) - Removed duplicate Option::get and renamed all related functions to use the term `unwrap` instead
2013-08-04rm obsolete `for` support from the compilerDaniel Micay-5/+0
2013-08-02librustc: Disallow "unsafe" for external functionsPatrick Walton-1/+1
2013-07-30syntax: implement foreach .. in .. { .. } via desugaring.Graydon Hoare-0/+1
2013-07-29New naming convention for ast::{node_id, local_crate, crate_node_id, ↵Michael Woerister-58/+57
blk_check_mode, ty_field, ty_method}
2013-07-28Add support for `..base` on static struct initializers.Kevin Mehall-1/+1
2013-07-22auto merge of #7940 : cmr/rust/comments, r=pnkfelixbors-8/+12
2013-07-22De-spanned<T> and renamed ast::field (now ast::Field)Michael Woerister-4/+3
2013-07-22Ast spanned<T> refactoring, renaming: crate, local, blk, crate_num, crate_cfg.Michael Woerister-23/+19
`crate => Crate` `local => Local` `blk => Block` `crate_num => CrateNum` `crate_cfg => CrateConfig` Also, Crate and Local are not wrapped in spanned<T> anymore.
2013-07-21Doc for ast::PathCorey Richardson-8/+12
2013-07-20syntax: modernise attribute handling in syntax::attr.Huon Wilson-25/+50
This does a number of things, but especially dramatically reduce the number of allocations performed for operations involving attributes/ meta items: - Converts ast::meta_item & ast::attribute and other associated enums to CamelCase. - Converts several standalone functions in syntax::attr into methods, defined on two traits AttrMetaMethods & AttributeMethods. The former is common to both MetaItem and Attribute since the latter is a thin wrapper around the former. - Deletes functions that are unnecessary due to iterators. - Converts other standalone functions to use iterators and the generic AttrMetaMethods rather than allocating a lot of new vectors (e.g. the old code would have to allocate a new vector to use functions that operated on &[meta_item] on &[attribute].) - Moves the core algorithm of the #[cfg] matching to syntax::attr, similar to find_inline_attr and find_linkage_metas. This doesn't have much of an effect on the speed of #[cfg] stripping, despite hugely reducing the number of allocations performed; presumably most of the time is spent in the ast folder rather than doing attribute checks. Also fixes the Eq instance of MetaItem_ to correctly ignore spaces, so that `rustc --cfg 'foo(bar)'` now works.
2013-07-17libsyntax: Remove some multi-gigabyte clones that were preventing ↵Patrick Walton-2/+2
bootstrapping on Windows.
2013-07-17librustc: Remove `copy` expressions from the language.Patrick Walton-1/+0
2013-07-17librustc: Remove all uses of "copy".Patrick Walton-72/+102
2013-07-17Made ast::blk not use spanned<T> anymore.Michael Woerister-2/+3
2013-07-11Get cross crate static default methods working. Closes #7569.Michael Sullivan-1/+1