about summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2013-11-04Remove #[deriving]s on implsSteven Fackler-3/+0
They seem to have been added by accident.
2013-11-04libsyntax/librustc: Allow calling variadic foreign functions.Luqman Aden-0/+1
2013-10-29librustc: Implement the `proc` type as sugar for `~once fn` and `proc`Patrick Walton-0/+1
notation for closures, and disable the feature gate for `once fn` if used with the `~` sigil.
2013-10-28Field identifiers now include specific spans (Closes #8263).Joshua Yanovski-1/+3
2013-10-25libsyntax/librustc: Allow mut qualifier in patterns.Luqman Aden-5/+3
2013-10-22libsyntax/librustc: Allow specifying mut on ~self.Luqman Aden-1/+1
2013-10-22libsyntax/librustc: Allow specifying mut on by-value self.Luqman Aden-3/+3
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-1/+1
Who doesn't like a massive renaming?
2013-10-18Optimize include_bin! for large inputsAlex Crichton-0/+1
Previously an ExprLit was created *per byte* causing a huge increase in memory bloat. This adds a new `lit_binary` to contain a literal of binary data, which is currently only used by the include_bin! syntax extension. This massively speeds up compilation times of the shootout-k-nucleotide-pipes test before: time: 469s memory: 6GB assertion failure in LLVM (section too large) after: time: 2.50s memory: 124MB Closes #2598
2013-10-10Remove named extern blocks from the ASTAlex Crichton-8/+0
There's currently a fair amount of code which is being ignored on unnamed blocks (which are the default now), and I opted to leave it commented out for now. I intend on very soon revisiting on how we perform linking with extern crates in an effort to support static linking.
2013-10-08add new enum ast::StrStyle as field to ast::lit_strBenjamin Herr-2/+9
For the benefit of the pretty printer we want to keep track of how string literals in the ast were originally represented in the source code. This commit changes parser functions so they don't extract strings from the token stream without at least also returning what style of string literal it was. This is stored in the resulting ast node for string literals, obviously, for the package id in `extern mod = r"package id"` view items, for the inline asm in `asm!()` invocations. For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just the style of string, because it seemed disproportionally cumbersome to thread that information through the string processing that happens with those string literals, given the limited advantage raw string literals would provide in these positions. The other syntax extensions don't seem to store passed string literals in the ast, so they also discard the style of strings they parse.
2013-10-04Remove specific errors for very old obsolete syntaxBenjamin Herr-3/+1
Replaces existing tests for removed obsolete-syntax errors with tests for the resulting regular errors, adds a test for each of the removed parser errors to make sure that obsolete forms don't start working again, removes some obsolete/superfluous tests that were now failing. Deletes some amount of dead code in the parser, also includes some small changes to parser error messages to accomodate new tests.
2013-10-01remove the `float` typeDaniel Micay-1/+0
It is simply defined as `f64` across every platform right now. A use case hasn't been presented for a `float` type defined as the highest precision floating point type implemented in hardware on the platform. Performance-wise, using the smallest precision correct for the use case greatly saves on cache space and allows for fitting more numbers into SSE/AVX registers. If there was a use case, this could be implemented as simply a type alias or a struct thanks to `#[cfg(...)]`. Closes #6592 The mailing list thread, for reference: https://mail.mozilla.org/pipermail/rust-dev/2013-July/004632.html
2013-09-30syntax: Remove usage of fmt!Alex Crichton-2/+2
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