summary refs log tree commit diff
path: root/src/libsyntax/ast.rs
AgeCommit message (Collapse)AuthorLines
2013-03-31Fix warningsBrian Anderson-1/+1
2013-03-30auto merge of #5630 : erickt/rust/serial, r=ericktbors-2/+2
@nikomatsakis and I were talking about how the serializers were a bit too complicated. None of the users of With the `emit_option` and `read_option` functions, the serializers are now moving more high level. This patch series continues that trend. I've removed support for emitting specific string and vec types, and added support for emitting mapping types.
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-35/+6
I believe this patch incorporates all expected syntax changes from extern function reform (#3678). You can now write things like: extern "<abi>" fn foo(s: S) -> T { ... } extern "<abi>" mod { ... } extern "<abi>" fn(S) -> T The ABI for foreign functions is taken from this syntax (rather than from an annotation). We support the full ABI specification I described on the mailing list. The correct ABI is chosen based on the target architecture. Calls by pointer to C functions are not yet supported, and the Rust type of crust fns is still *u8.
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-1/+1
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-2/+2
Decoder::read_{owned,managed}_str
2013-03-28Removing unused importsAlex Crichton-1/+1
2013-03-28auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphismbors-4/+22
Clean things up a bit. Also, allow selecting intel syntax in addition to the default AT&T dialect.
2013-03-28librustc: Remove common fields and nested enums from the languagePatrick Walton-2/+0
2013-03-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-8/+1
Hey folks, This patch series does some work on the json decoder, specifically with auto decoding of enums. Previously, we would take this code: ``` enum A { B, C(~str, uint) } ``` and would encode a value of this enum to either `["B", []]` or `["C", ["D", 123]]`. I've changed this to `"B"` or `["C", "D", 123]`. This matches the style of the O'Caml json library [json-wheel](http://mjambon.com/json-wheel.html). I've added tests to make sure all this work. In order to make this change, I added passing a `&[&str]` vec to `Decode::emit_enum_variant` so the json decoder can convert the name of a variant into it's position. I also changed the impl of `Encodable` for `Option<T>` to have the right upper casing. I also did some work on the parser, which allows for `fn foo<T: ::cmp::Eq>() { ... }` statements (#5572), fixed the pretty printer properly expanding `debug!("...")` expressions, and removed `ast::expr_vstore_fixed`, which doesn't appear to be used anymore.
2013-03-27libsyntax: Allow selecting intel style asm.Luqman Aden-1/+10
2013-03-27libsyntax: use a struct for inline asm in ast.Luqman Aden-4/+13
2013-03-27auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, ↵bors-1/+0
r=nikomatsakis Per discussion on IRC. r? @pcwalton
2013-03-27Fix pretty-printer test failure by carrying the bound lifetime names throughNiko Matsakis-0/+1
the types. Initially I thought it would be necessary to thread this data through not only the AST but the types themselves, but then I remembered that the pretty printer only cares about the AST. Regardless, I have elected to leave the changes to the types intact since they will eventually be needed. I left a few FIXMEs where it didn't seem worth finishing up since the code wasn't crucial yet.
2013-03-27syntax: Remove deprecated expr_vstore_fixedErick Tryzelaar-1/+0
2013-03-27syntax: fix pretty printing __log stmtsErick Tryzelaar-7/+1
2013-03-27remove sty_by_ref, though traces still remain due to dtorsNiko Matsakis-1/+0
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-0/+1
2013-03-22librustc: Remove the `const` declaration form everywherePatrick Walton-2/+2
2013-03-22librustc: Remove `pure` from libsyntax and librustc.Patrick Walton-22/+22
2013-03-22librustc: Remove all uses of `static` from functions. rs=destaticPatrick Walton-1/+1
2013-03-22syntax: replace uses of old deriving attribute with new oneAndrew Paseltiner-85/+85
2013-03-20Refactor the self-info so that the def-id is carried in ty_self()Niko Matsakis-1/+1
and the fn_ctxt doesn't need any self_info field at all. Step towards fixing `fn(&self)` (cc #4846) to have a distinct lifetime.
2013-03-19auto merge of #5426 : nikomatsakis/rust/issue-4846-lifetimes-in-expl-self, ↵bors-7/+7
r=pcwalton (this will be needed for snapshotting at some point) r? @pcwalton
2013-03-18Fix pretty printer for fixed length vectors.Luqman Aden-1/+0
2013-03-18Allow constant expressions in [Type * n].Luqman Aden-1/+1
2013-03-18Make &self permit explicit lifetimes, but don't really use themNiko Matsakis-7/+7
(this will be needed for snapshotting at some point).
2013-03-15Actually pass inline asm operands around.Luqman Aden-2/+4
2013-03-13Remove `++` mode from the compiler (it is parsed as `+` mode)Niko Matsakis-1/+1
and obsolete `-` mode altogether (it *was* parsed as `+` mode).
2013-03-12Add alignstack option for inline asm.Luqman Aden-2/+2
2013-03-12Keep everything tidy.Luqman Aden-1/+1
2013-03-12Parse operands properly and add a way to indicate volatile asm.Luqman Aden-1/+2
2013-03-12Parse inline assembly.Luqman Aden-0/+2
2013-03-11libsyntax: Remove newtype enums from libsyntax. rs=deenumPatrick Walton-6/+1
2013-03-11Implement vector destructuring from tailSeo Sanghyeon-1/+3
2013-03-09Remove @ast::Region and replace with @ast::Lifetime.Niko Matsakis-25/+7
Modify pretty-printer to emit lifetimes and fix a few minor parser bugs that this uncovered.
2013-03-07librustc: Stop parsing `assert`.Patrick Walton-3/+0
2013-03-07librustc: Remove record patterns from the compilerPatrick Walton-1/+0
2013-03-07libsyntax: Remove struct literal expressions from the compilerPatrick Walton-1/+0
2013-03-07librustc: Remove structural record types from the compilerPatrick Walton-1/+0
2013-03-06auto merge of #5255 : jbclements/rust/remove-parse-value-ident, r=graydonbors-0/+4
After the removal of the "restricted keyword" feature in 0c82c00dc4f49aeb9b57c92c9a40ae35d8a1ee29 , there's no longer any difference between parse_ident() and parse_value_ident(), and therefore no difference between parse parse_path_without_tps() and parse_value_path(). I've collapsed all of these, removing the redundant functions and eliminating the need for two higher-order arguments.
2013-03-06Fix a bug with region-parameterized enums etc where trans consideredNiko Matsakis-2/+8
them to be non-monomorphic. Merely having lifetime parameters is not enough to qualify for that status. Fixes #5243.
2013-03-06removed unused abstraction over paths and value_pathsJohn Clements-0/+4
2013-03-05Update region inference for traits so that a method withNiko Matsakis-0/+9
explicit self doesn't incorrectly cause the entire trait to be tagged as being region-parameterized. Fixes #5224.
2013-03-04Adding missing imports for tests, and gate off othersAlex Crichton-4/+4
2013-03-04Remove unused imports throughout src/Alex Crichton-2/+0
2013-03-02librustc: Stop parsing `fn@`, `fn~`, and `fn&`Patrick Walton-4/+0
2013-03-01Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-1/+1
2013-02-28librustc: Mark all type implementations public. rs=impl-publicityPatrick Walton-1/+1
2013-02-28Merge remote-tracking branch 'remotes/origin/incoming' into incomingErick Tryzelaar-15/+34
2013-02-27auto merge of #5141 : nikomatsakis/rust/region-syntax-expl-lifetimes, ↵bors-15/+34
r=nikomatsakis Major changes are: - replace ~[ty_param] with Generics structure, which includes both OptVec<TyParam> and OptVec<Lifetime>; - the use of syntax::opt_vec to avoid allocation for empty lists; cc #4846 r? @graydon