summary refs log tree commit diff
path: root/src/libsyntax
AgeCommit message (Collapse)AuthorLines
2013-03-31Fix warningsBrian Anderson-8/+5
2013-03-30libsyntax: Update abi constants. Fixes #5423.Luqman Aden-5/+2
2013-03-30auto merge of #5630 : erickt/rust/serial, r=ericktbors-29/+15
@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-30syntax: fix auto_encode test.Erick Tryzelaar-4/+4
2013-03-29Add AbiSet and integrate it into the AST.Niko Matsakis-133/+588
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-46/+33
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-3/+3
2013-03-29librustc: Remove `fail_unless!`Patrick Walton-46/+33
2013-03-29Merge remote-tracking branch 'remotes/origin/incoming' into serialErick Tryzelaar-62/+45
2013-03-29std: add Encoder::emit_map and Decoder::read_mapErick Tryzelaar-0/+10
2013-03-29std: remove Encoder::read_rec and Decoder::emit_recErick Tryzelaar-3/+0
2013-03-29std: remove Encoder::emit_tup{,_elt} and Decoder::read_tup{,_elt}Erick Tryzelaar-7/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_vec and ↵Erick Tryzelaar-9/+2
Decoder::read_{owned,managed}_vec
2013-03-29std: remove Encoder::emit_{owned,managed} and Decoder::read_{owned,managed}Erick Tryzelaar-4/+0
2013-03-29std: remove Encoder::emit_{owned,managed}_str and ↵Erick Tryzelaar-6/+3
Decoder::read_{owned,managed}_str
2013-03-29auto merge of #5570 : alexcrichton/rust/fix-unused-imports, r=sanxiynbors-61/+40
Before it wouldn't warn about unused imports in the list if something in the list was used. These commits fix that case, add a test, and remove all unused imports in lists of imports throughout the compiler.
2013-03-28auto merge of #5616 : pcwalton/rust/parenthesized-trait, r=brsonbors-1/+5
r? @brson
2013-03-28Removing unused importsAlex Crichton-61/+40
2013-03-28libsyntax: Don't allow `impl (Trait) for Type` (with the parentheses).Patrick Walton-1/+5
2013-03-28auto merge of #5593 : luqmana/rust/inline-asm, r=catamorphismbors-23/+50
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-87/+34
2013-03-28auto merge of #5596 : luqmana/rust/unit-struct, r=catamorphismbors-0/+4
Fixes #5449.
2013-03-28auto merge of #5586 : pcwalton/rust/expr-repeat-vstore, r=graydonbors-8/+8
r? @graydon
2013-03-27auto merge of #5578 : erickt/rust/incoming, r=jbclements,ericktbors-87/+292
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-27derive Eq and Clone impls where applicableAndrew Paseltiner-28/+4
2013-03-27libsyntax: error on struct Foo {}.Luqman Aden-0/+4
2013-03-27libsyntax: Allow selecting intel style asm.Luqman Aden-6/+16
2013-03-27libsyntax: use a struct for inline asm in ast.Luqman Aden-23/+40
2013-03-27librustc: Allow expr_repeat to be used with any vstorePatrick Walton-8/+8
2013-03-27auto merge of #5558 : nikomatsakis/rust/issue-4920-autoref-index-operator, ↵bors-30/+11
r=nikomatsakis Per discussion on IRC. r? @pcwalton
2013-03-27Fix pretty-printer test failure by carrying the bound lifetime names throughNiko Matsakis-4/+13
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-19/+4
2013-03-27syntax: fix pretty printing __log stmtsErick Tryzelaar-25/+12
2013-03-27syntax: Remove dead code from the parserErick Tryzelaar-8/+0
2013-03-27syntax: Fix parsing global generics (Closes #5572)Erick Tryzelaar-2/+3
2013-03-27std: Decode::read_enum_variant should pass in the variant namesErick Tryzelaar-3/+14
Because the json::Decoder uses the string variant name, we need a way to correlate the string to the enum index. This passes in a static &[&str] to read_enum_variant, which allows the json::Decoder to know which branch it's trying to process.
2013-03-27std: add option type directly to serialize::{En,De}codeErick Tryzelaar-9/+70
2013-03-27std: change default json enum encoder to use strings or a flat vecErick Tryzelaar-15/+17
2013-03-27std: Add tests for json decoding optionsErick Tryzelaar-13/+24
2013-03-27syntax: pass some values around by referenceErick Tryzelaar-6/+6
2013-03-27syntax: Add new values that can be used with the quasiquoterErick Tryzelaar-2/+157
2013-03-27Simplify and remove unnecessary use of ast_mapNiko Matsakis-2/+0
2013-03-27remove sty_by_ref, though traces still remain due to dtorsNiko Matsakis-28/+11
2013-03-26librustc: Enforce that `extern mod` directives come first, then `use` ↵Patrick Walton-33/+77
directives, then items. Resolve them in this order as well.
2013-03-26librustc: Modify all code to use new lifetime binder syntaxPatrick Walton-18/+35
2013-03-26librustc: Stop parsing `[T * N]`.Patrick Walton-2/+7
2013-03-26librustc: Remove all uses of the old `[T * N]` fixed-length vector syntaxPatrick Walton-1/+1
2013-03-26libsyntax: Stop parsing `[const T]`.Patrick Walton-1/+1
2013-03-26option: rm functions that duplicate methodsDaniel Micay-10/+5
2013-03-26Move ast_map::map to LinearMapAlex Crichton-19/+19