Paul Stansifer
0f707f42c8
Distinguish stmt_mac
s that are followed by semicolons and those that aren't.
2012-11-29 12:09:10 -08:00
Paul Stansifer
ee076f63f9
Allow for macros to occur in statement position.
2012-11-29 12:09:10 -08:00
Brian Anderson
fc06114ddf
Merge remote-tracking branch 'brson/companion' into incoming
...
Conflicts:
src/compiletest/compiletest.rs
src/libcargo/cargo.rs
src/libcore/core.rs
src/librustc/rustc.rs
src/librustdoc/rustdoc.rc
2012-11-28 13:17:33 -08:00
Patrick Walton
61cfec3c52
librustc: Parse extern "C" { ... }
. r=brson
2012-11-28 11:28:16 -08:00
Brian Anderson
be6613e048
Remove the crate language
2012-11-26 18:13:54 -08:00
Brian Anderson
ddbff6fd2a
syntax: Remove cdir_syntax. Unused
2012-11-18 18:09:41 -08:00
Patrick Walton
32ad4ae4cd
librustc: Require the #[derivable] attribute, remove the significance of "impl Foo : Bar;", and allow only a subset of methods in a trait to be derived. r=brson
2012-11-14 11:36:55 -08:00
Patrick Walton
0fc952372a
rustc: Support irrefutable patterns in function arguments. r=nmatsakis
2012-11-07 19:29:30 -08:00
Niko Matsakis
b0ed151539
Cleanup how we handle proto in types, remove unsound subtyping
...
Fixes #1896 which was never truly fixed, just masked.
The given tests would have failed had they used `~fn()` and
not `@fn()`. They now result in compilation errors.
Fixes #2978 .
Necessary first step for #2202 , #2263 .
2012-11-06 08:56:29 -08:00
Patrick Walton
be93b29d30
rustc: Implement parsing and typechecking for "once fn"
2012-11-05 13:17:02 -08:00
Brian Anderson
762101b72a
syntax: Fold macros in default methods. Closes #3911
2012-11-02 23:11:36 -07:00
Brian Anderson
3edccc311e
Support #[cfg] on methods
2012-11-01 15:48:50 -07:00
Tim Chevalier
62f98c8ff8
Preserve parenthesization in the AST
...
Maintain explicit "paren" nodes in the AST so we can pretty-print
without having to guess where parens should go. We may revisit this
in the future.
r=graydon
2012-10-30 15:05:32 -07:00
Patrick Walton
599b4208fb
rustc: Translate tuple struct constructors
2012-10-25 11:49:26 -07:00
Patrick Walton
4da58a5bd6
rustc: Implement typechecking for tuple structs. r=nmatsakis
2012-10-24 10:54:09 -07:00
Tim Chevalier
087cbb55d0
Remove <- operator from the compiler
...
Yield an obsolete syntax error on things like "let foo <- bar;"
and "foo <- bar;" r=brson
Progress on #3466
2012-10-23 12:10:19 -07:00
Patrick Walton
3bf0a9b094
rustc: Implement typechecking for simple monomorphic derivable traits on monomorphic types. r=brson
2012-10-23 10:45:23 -07:00
Tim Chevalier
46d4bbbae4
Simplify the AST representation of ty param bounds
...
Change ast::ty_param_bound so that all ty param bounds are represented
as traits, with no special cases for Copy/Send/Owned/Const.
typeck::collect generates the special cases.
A consequence of this is that code using the #[no_core] attribute
can't use the Copy kind/trait. Probably not a big deal?
As a side effect, any user-defined traits that happen to be called
Copy, etc. in the same module override the built-in Copy trait.
r=nmatsakis
Closes #2284
2012-10-22 09:01:12 -07:00
Patrick Walton
91ae5412d8
rustc: Merge module and type namespaces. r=brson
2012-10-15 15:35:36 -07:00
Niko Matsakis
98887cc7ee
remove ctor from ast (take 2) (no review: just dead code removal)
2012-10-12 19:46:37 -07:00
Tim Chevalier
7bdab1e4a4
Revert "remove ctor from ast"
...
This reverts commit ed3689d57c
.
2012-10-08 09:00:23 -07:00
Niko Matsakis
ed3689d57c
remove ctor from ast
2012-10-08 06:36:42 -07:00
Niko Matsakis
21519bc7e0
demode vec
2012-09-28 13:27:45 -07:00
Patrick Walton
0bcb3bc536
libsyntax: Parse visibility modifiers before foreign items
2012-09-27 12:48:09 -07:00
Brian Anderson
e8fe718bfd
core: Replace map/map_default with map_ref/map_default_ref
2012-09-26 20:15:23 -07:00
Niko Matsakis
67a8e7128a
Demode vec::push (and convert to method)
2012-09-26 18:02:07 -07:00
Graydon Hoare
9c6ae65865
Support visibility qualifiers in crate directives properly.
2012-09-24 17:29:32 -07:00
Brian Anderson
4a78f9b166
core: Demode option
2012-09-23 17:15:00 -07:00
Niko Matsakis
ba3eebd41d
Make it illegal to use modes in a fn signature with providing
...
an explicit variable name. (Step one to changing the defaults)
First step to #3535
2012-09-23 13:30:13 -05:00
Niko Matsakis
3d59ac3a19
De-mode vec::map, vec::eachi, vec::rev_each, vec::rev_eachi
2012-09-21 19:13:55 -07:00
Brian Anderson
f5be40384f
Revert "syntax: Make attributes sendable for rustdoc's benefit"
...
This reverts commit 90e3665fa7
.
2012-09-20 18:15:39 -07:00
Brian Anderson
90e3665fa7
syntax: Make attributes sendable for rustdoc's benefit
2012-09-20 17:37:21 -07:00
Tim Chevalier
53ce42dc4f
Implement &-patterns
...
Closes #2855
2012-09-07 17:09:07 -07:00
Brian Anderson
200959d7ce
Remove 'with'
2012-09-04 15:47:04 -07:00
Patrick Walton
8ff18acc82
libsyntax: "import" -> "use"
2012-09-04 11:43:23 -07:00
Tim Chevalier
cb8ecd7984
Allow extern mods to be anonymous
...
extern mod {
f();
}
is now allowed, and puts f in the enclosing scope. (Requires a
link_name attribute to be really useful...)
2012-08-29 12:22:05 -07:00
Brian Anderson
8337fa1a54
Camel case the option type
2012-08-26 15:56:16 -07:00
Patrick Walton
8ef4551904
rustc: Implement foreign constants.
...
This is needed for a lot of Apple libraries, as Apple tends to put a lot of
globals in dynamic libraries.
2012-08-25 15:09:33 -07:00
Tim Chevalier
5e22fb9c7f
Remove match check
2012-08-24 22:28:12 -07:00
Niko Matsakis
a8f1bee457
fix some unused pattern binding warnings
2012-08-24 15:37:21 -07:00
Michael Sullivan
0f996f70a6
Remove purity from fn_decl and move it out to containing AST elements.
2012-08-23 19:40:01 -07:00
Paul Stansifer
1153b5dcc8
intern identifiers
2012-08-22 14:59:25 -07:00
Patrick Walton
3038968f28
rustc: Perform some AST surgery to separate out class fields from methods
2012-08-15 16:20:35 -07:00
Patrick Walton
bdb206f285
rustc: Parse labeled loop, break, and again
2012-08-15 16:20:34 -07:00
Patrick Walton
5c9c9a6a9f
libsyntax: Parse common enum fields
2012-08-08 19:51:48 -07:00
Brian Anderson
6a0720b439
Convert impls to new syntax
2012-08-08 18:19:24 -07:00
Patrick Walton
4f98e80db1
rustc: Do some plumbing work in preparation for common fields in enums
2012-08-08 17:15:37 -07:00
Patrick Walton
f110e8f21c
rustc: Do some plumbing work on nested enums
2012-08-08 14:19:21 -07:00
Patrick Walton
5ce3281a62
rustc: Parse variant structs; add a trivial test case
2012-08-07 18:55:19 -07:00
Patrick Walton
438765da59
rustc: Box struct_defs
2012-08-07 17:46:51 -07:00