Marijn Haverbeke
24102d50ad
Obj system? What obj system?
...
Removes the obj system from the compiler.
Closes #1484
2012-01-13 11:51:29 +01:00
Marijn Haverbeke
eb07fa4d3b
Remove all remaining uses of objs from the compiler
2012-01-13 11:51:17 +01:00
Marijn Haverbeke
7f62944559
Convert the objects used in the lexer and parser to records + impls
2012-01-13 11:50:53 +01:00
Niko Matsakis
8818f42b19
make parser disambiguate fn~ at top level correctly
2012-01-12 13:47:38 -08:00
Marijn Haverbeke
efb9df1ebd
Make driver::session::session no longer an object
...
Rather, it is now a struct where properties like opts are accessed
directly, and the error-reporting methods are part of a static impl
(with the same name as the type).
2012-01-12 18:04:02 +01:00
Kevin Atkinson
44352df57c
Cleanups to previous commits for issue #1393 .
2012-01-12 09:55:48 +01:00
Marijn Haverbeke
34d7f05292
Major clean-up of std::io
...
Use ifaces instead of objs, stop wrapping everything in two (or three)
layers of no-value-added indirection, and remove some of the more
pointless/outdated idioms from the code.
2012-01-11 21:00:11 +01:00
Niko Matsakis
c68345e57e
add a log_str() function and allow '%?' in fmt strings to use it
2012-01-11 10:32:54 -08:00
Graydon Hoare
0e334c6839
Fold and re-evaluate expr in tag discriminant.
2012-01-10 15:59:57 -08:00
Kevin Atkinson
08abf8d37f
Support explicit discriminant numbers on tag variants.
...
Addresses issue #1393 .
For now disallow disr. values unless all variants use nullary
contractors (i.e. "enum-like").
Disr. values are now encoded in the crate metadata, but only when it
will differ from the inferred value based on the order.
2012-01-10 15:59:57 -08:00
Patrick Walton
ffdb7f97f8
rustc: Accept "enum" in addition to "tag"
2012-01-10 15:32:39 -08:00
Niko Matsakis
1592de0faf
replace lambda with fn@
2012-01-10 13:31:06 -08:00
Niko Matsakis
8b911587df
rename sendfn to fn~, lambda to fn@
2012-01-10 13:31:06 -08:00
Austin Seipp
070b1c8333
Remove support for 'when' in alt-patterns from parser
...
Issue #1396
2012-01-09 19:27:06 -08:00
Austin Seipp
a94b1ccacb
Change all uses of 'when' in alt-patterns to 'if'
...
Issue #1396
2012-01-09 19:27:05 -08:00
Graydon Hoare
8387896dda
Remove proto_sugar and 'lambda' as keyword, commit to fn@.
2012-01-09 16:12:48 -08:00
Austin Seipp
9211348989
Make the parser accept 'if' as an alternative to 'when' in alt patterns.
...
Also fix the pretty printer, making it output 'if' instead of 'when'.
Issue #1396
2012-01-09 10:50:33 -08:00
Marijn Haverbeke
41a2d8495e
Fix pretty-printing of ty params in iface methods
2012-01-06 17:40:05 +01:00
Niko Matsakis
e1a0d0f03d
fix pretty printer to correctly insert parens for disamb
2012-01-05 10:44:38 -08:00
Niko Matsakis
f832edc369
require a non-semi expr acting as a stmt to have unit return type
2012-01-05 10:44:38 -08:00
Niko Matsakis
37ba5f3b32
make parser handle parenthesized block-sugar exprs properly
2012-01-05 10:44:38 -08:00
Marijn Haverbeke
60ae1590af
Switch to new param kind bound syntax
...
And remove support for the old syntax
2012-01-05 15:50:02 +01:00
Marijn Haverbeke
516fbed230
Fix bad spans for ast::ty parsing
...
The span would be pointing after the actual text.
2012-01-05 11:09:19 +01:00
Marijn Haverbeke
42f6608ffd
Add visit_ty_params to visit.rs
...
And use it to make typechecking of bounds less error-prone.
2012-01-04 17:30:36 +01:00
Niko Matsakis
72a3667eb3
Allow tail expressions even in no_value blocks. Type checker
...
will guarantee they have unit type.
2012-01-03 13:13:52 -08:00
Niko Matsakis
de383bcfed
extend parser so that expressions that do not require semi-colons
...
to be statements are not considered expressions in the tail position
2012-01-03 13:13:51 -08:00
Niko Matsakis
9e1dc703d2
rewrite to put blk as 2nd arg
2012-01-03 13:13:51 -08:00
Niko Matsakis
e34abbacf6
minimal changes to permit fn blocks in expr
2012-01-03 13:13:51 -08:00
Marijn Haverbeke
506a6ec38b
Make syntax for impls less magical
...
The trick of interpreting parameters to the iface type as parameters
to the impl was just too magical.
Issue #1227
2012-01-03 15:37:41 +01:00
Niko Matsakis
8319b5a252
add cap clause to pretty printer, with a test
2011-12-30 16:25:55 -08:00
Niko Matsakis
aa5382bb13
split proto from fn_decl, as not all fn_decls know the proto.
...
this will address the (crashing) new test added.
2011-12-29 20:29:28 -08:00
Graydon Hoare
36c55b20a8
Add support in lexer for utf8 identifiers. No NFKC logic in char yet.
2011-12-29 14:45:18 -08:00
Graydon Hoare
51227c1e8a
Merge pull request #1389 from erickt/master
...
misc standard library additions
2011-12-28 13:05:02 -08:00
Marijn Haverbeke
9236fdf39f
Move the kind datatype to middle::ty
...
The AST no longer references it.
2011-12-28 21:18:16 +01:00
Marijn Haverbeke
1ed6a27548
Change representation of type params to handle interface bounds
...
Issue #1227
2011-12-28 21:18:16 +01:00
Erick Tryzelaar
5d84652f51
comp: minor cleanup.
2011-12-28 11:19:41 -08:00
Marijn Haverbeke
46cddffb8f
Go back to a single visit_fn function in visit.rs
2011-12-23 18:45:02 +01:00
Marijn Haverbeke
711ff657e2
Get rid of visit_fn_block in visit.rs
...
It seems redundant and error-prone.
2011-12-23 18:24:49 +01:00
Marijn Haverbeke
25e65239ad
Check impls methods against the type of their iface.
2011-12-23 18:11:36 +01:00
Marijn Haverbeke
057617c665
Parse iface
items and interface references in impl
items.
...
The (temporary) syntax is
iface seq<T> {
fn len() -> uint;
fn iter(f: block(T));
}
// The 'blah<T>' can be left of to default the name of the
// impl to seq<T>. The 'of seq<T>' can be left off when
// not implementing a named interface.
impl blah<T> of seq<T> for [T] {
fn len() -> uint { vec::len(self) }
fn iter(f: block(T)) { for x in self { f(x); } }
}
2011-12-23 18:09:25 +01:00
Marijn Haverbeke
970f5cc0e4
Make ast::ty_method hold a fn_decl, rather than duplicating its fields
2011-12-23 13:32:17 +01:00
Graydon Hoare
f0dfbe7b1b
Register new snapshots, purge log_err and log_full in favour of log(...).
2011-12-22 17:53:53 -08:00
Graydon Hoare
ccb5b6fb25
Switch core macros to expand to log(level, ...).
2011-12-22 16:36:55 -08:00
Graydon Hoare
389329ef1e
Merge all 3 log syntaxes, tidy up residual misuses.
2011-12-22 16:14:00 -08:00
Graydon Hoare
dcd771cd48
Merge branch 'master' of github.com:graydon/rust
2011-12-22 14:50:52 -08:00
Graydon Hoare
8b580954fe
Register snapshots and switch logging over to use of log_full or #error / #debug.
2011-12-22 14:42:52 -08:00
Marijn Haverbeke
eacb629442
Work around unwinding bug
...
See issue #1374
2011-12-22 20:38:09 +01:00
Marijn Haverbeke
0490c36143
Unify some data structures in syntax::ast that were doing the same thing
...
As a preparation to removing some duplication in typeck.
2011-12-22 20:18:56 +01:00
Graydon Hoare
3b61064631
Revert all of yesterday's snapshots and try again. Cursed!
2011-12-22 10:30:04 -08:00
Graydon Hoare
47d27af228
Merge branch 'master' of github.com:graydon/rust
2011-12-22 09:30:03 -08:00
Marijn Haverbeke
e2e077c831
Remove trivial cast checker
...
I consider the added complexity not justified at this point, and it
interacts badly with the patches for issue #828 . Feel free to discuss.
2011-12-22 15:04:00 +01:00
Graydon Hoare
047b02d5bc
More flailing on log syntax due to call-expr ambiguity in previous attempt.
2011-12-21 18:05:08 -08:00
Graydon Hoare
5d1cf2a872
Out-of-order-code typo. Snapshot again.
2011-12-21 15:43:38 -08:00
Graydon Hoare
8d9e7deab5
Switch log_expr to carrying a full expr:u32 for level. Add log_full variant that parses that expr, prepare for snapshot.
2011-12-21 14:31:31 -08:00
Niko Matsakis
c03d14a33d
upgrade kind check
2011-12-21 06:14:36 -08:00
Niko Matsakis
01cb1044f7
update pprinter to understand ret type of block, add warnings
2011-12-21 06:14:35 -08:00
Niko Matsakis
6a90140941
Make { || ... } sugar for any type of closure, inferred
2011-12-21 06:14:35 -08:00
Haitao Li
1e4de33374
rustc: Exclude stdin from codemap files when lookup_pos
...
Fixes issue #1362
2011-12-21 22:07:48 +08:00
Graydon Hoare
3bc4da96f1
Inject "core macros" into default syntax-expansion environment. Bit of a kludge but enough to work on logging-via-macros.
2011-12-20 13:38:10 -08:00
Niko Matsakis
55a2fd18ec
implement capture clauses (move, in particular) and integrate
...
them into type state and so forth
2011-12-19 14:07:46 -08:00
Niko Matsakis
b2b2a430df
resolve capture clauses
2011-12-19 14:07:46 -08:00
Marijn Haverbeke
60acae4df7
Add type argument field to expr_path
...
This way, you can explicitly provide type parameters when calling a
generic method.
Issue #1227
2011-12-19 10:43:23 +01:00
Marijn Haverbeke
7185ea35c3
Use quotes around tokens in parser error messages to make them more readable
...
Closes #1328
2011-12-19 09:59:51 +01:00
Marijn Haverbeke
f4acaf6934
Only look for a matching method when normal field access fails
...
We should probalby warn when defining a method foo on {foo: int} etc.
This should reduce the amount of useless typevars that are allocated.
Issue #1227
2011-12-18 19:41:44 +01:00
Marijn Haverbeke
dd9693f211
Reserve node_id 0 for the crate top-level module
...
And define a const to refer to it.
2011-12-16 22:17:47 +01:00
Graydon Hoare
d1bca753b8
Switch fmt extension to reference extfmt that's in core.
2011-12-16 10:59:11 -08:00
Niko Matsakis
2833ca478c
reorder args to the various vec, option fns so blk comes last
2011-12-16 07:17:23 -08:00
Marijn Haverbeke
d529757515
Make polymorphic impl methods work
...
Something will still have to be done to the AST to make it possible to
say `x.foo::<int>()`, since currently field access never allows type
parameters.
Issue #1227
2011-12-16 13:47:48 +01:00
Marijn Haverbeke
cff6bdd036
Change syntax for impl
...
Move the name of the bundle to the front, allow type parameters (not
handled yet), and add a 'for' keyword:
impl utils for int {
fn str() -> str { int::str(self) }
fn times(f: block()) { ... }
}
2011-12-16 11:46:57 +01:00
Marijn Haverbeke
4f826d81f6
Make 1.f parse as a field access on the integer 1
...
A dot is only considered part of a number when not followed by a letter
Closes #1306
2011-12-16 11:46:57 +01:00
Marijn Haverbeke
7efef98901
Make uses of self in impls compile
...
Get rid of expr_self_call, introduces def_self. `self` is now,
syntactically, simply a variable. A method implicitly brings a `self`
binding into scope.
Issue #1227
2011-12-16 11:46:57 +01:00
Marijn Haverbeke
888bc80025
Parse and resolve implementations.
...
Issue #1227
2011-12-16 11:46:57 +01:00
Niko Matsakis
1e3259e119
massive refactor of how closures work
2011-12-15 13:44:06 -08:00
Marijn Haverbeke
f82d101511
Iterate over an array when creating the parser's reserved word table
2011-12-15 08:18:38 +01:00
Niko Matsakis
1869306a7e
change syntax from lambda[send] to sendfn
2011-12-14 14:32:24 -08:00
Niko Matsakis
85f381fb8a
restructure, temporarily working around what looks like an LLVM bug
2011-12-14 14:32:23 -08:00
Niko Matsakis
6b744b284e
remove extra trailing semicolon
2011-12-14 14:32:21 -08:00
Niko Matsakis
aa1cd61c84
push changes through to get things compiling, if not running.
2011-12-14 14:32:18 -08:00
Niko Matsakis
c28ada0368
first attempt, not happy with it
2011-12-14 14:32:18 -08:00
Niko Matsakis
941101a9cd
define ty and update parser for sendable lambdas
2011-12-14 14:32:17 -08:00
Graydon Hoare
fa9ad984fb
Copy first batch of material from libstd to libcore.
2011-12-13 16:34:50 -08:00
Marijn Haverbeke
44ffd8e3aa
Allow type annotations for blocks
...
I.e. {|foo: int| -> int foo + 2}
Issue #1275
2011-12-09 09:42:22 +01:00
Marijn Haverbeke
0e74121ddb
Error when parsing the empty record type
...
Issue #1200
2011-12-08 13:29:43 +01:00
Marijn Haverbeke
9a269a3aa8
Allow binding of nested patterns
...
See src/test/run-pass/nested-patterns.rs for some examples. The syntax is
boundvar@subpattern
Which will match the subpattern as usual, but also bind boundvar to the
whole matched value.
Closes #838
2011-12-08 12:03:48 +01:00
Marijn Haverbeke
a7c6cb7385
Consider variant constructors pure functions for the purpose of purity checking
...
Closes #1269
2011-12-08 10:26:42 +01:00
Graydon Hoare
e056ffa17d
Inject the view_items for core in the right place, add comment documenting why the wrong place was wrong.
2011-12-07 13:33:00 -08:00
Graydon Hoare
799690bea0
Remove stmt_crate_directive, it's vestigial and confusing.
2011-12-07 13:33:00 -08:00
Marijn Haverbeke
3d0610b072
Check for literals that are out of range for their type
2011-12-07 21:53:05 +01:00
Marijn Haverbeke
e3eca9174b
Change literal representation to not truncate
...
Also shuffles around the organization of numeric literals and types,
separating by int/uint/float instead of machine-vs-non-machine types.
This simplifies some code.
Closes #974
Closes #1252
2011-12-07 21:08:28 +01:00
Niko Matsakis
6c95e400d8
repair more hash functions
2011-12-07 07:35:25 -08:00
Niko Matsakis
8b608125ac
fix hash function: + binds tighter than <<
2011-12-06 21:34:50 -08:00
Stefan Plantikow
4ba3158e4f
parse: typeck: enabling trivial casts of tail-call return values
...
introduces ctypes::m_* machine type aliases for int, uint, float
depending on cfg(target_arch) that are used in tests
2011-12-02 11:38:24 -08:00
Stefan Plantikow
29f7cdffa4
ty: trans: added support for dropping trivial casts
2011-12-02 11:38:24 -08:00
Marijn Haverbeke
7655b3c0c6
Stop lexing -1 as a single token
...
And remove the hack that made 1-1 work given that other hack.
Issue #954
2011-12-02 13:57:12 +01:00
Marijn Haverbeke
64ce092c27
Allow literal patterns to contain arbitrary literal expressions
...
This removes the need for the unary minus hacks, and allows some other
neat things like matching on 1 >> 4.
Issue #954
2011-12-02 13:42:51 +01:00
Marijn Haverbeke
b40c6773c2
Box ast::path values
...
It seems inefficient to copy them around. Let's measure whether that's actually
> the case
2011-11-30 13:38:38 +01:00
Brian Anderson
7aee9f7b56
rustc: Fix a bug in cdir attribute parsing
...
The first attribute of the first mod was being applied to every mod.
2011-11-24 16:18:26 -08:00
Haitao Li
3e303af86b
rustc: Add a path attribute for crate directives
...
The path information was an optional "filename" component of crate
directive AST. It is now replaced by an attribute with metadata named
"path".
With this commit, a directive
mod foo = "foo.rs";
should be written as:
#[path = "foo.rs"]
mod foo;
Closes issue #906 .
2011-11-24 15:31:18 -08:00
Haitao Li
05b2cb8ecc
rustc: Accepts path
attributes for crate directives
...
Temporarily allow path specified in either as attribute or in AST, like:
#[path = "mymod.rs"]
mod mymod = "mymod.rs";
This is a transitional commit to avoid creating a stage1 snapshot.
2011-11-24 14:55:53 -08:00
Haitao Li
2253ed5d1c
rustc: Fix position of diagnostic highlight lines
...
Diagnostic highlight lines are incorrect placed when the related line
number is 10, 100, etc.
The root cause is line number are treated as 0 based (should be 1 based)
when calculating offset of line number digits.
2011-11-24 08:10:11 +01:00
Marijn Haverbeke
8746ebe2e6
Add some changes that *should* have been in e98286b594
...
Forgot to amend the commit after fixing the failure.
2011-11-23 21:22:56 +01:00
Marijn Haverbeke
e98286b594
Allow import directives in any block
...
Closes #49
2011-11-23 20:57:34 +01:00
Marijn Haverbeke
9fb3719ded
Rollback return-by-reference
...
It's proving too inflexible, so I'm ripping out the extra complexity
in the hope that regions will, at some point, provide something
similar.
Closes #918
2011-11-23 11:02:27 +01:00
Marijn Haverbeke
a8dd52ed36
Remove last traces of auth keyword
...
The reference now has an empty hole where the auth keyword used to be.
Changing the keyword table seems to require manually sorting the
keywords and putting them back into some kind of arcane interleaved
order. I'll open an issue to actually fix this.
Closes #1211
2011-11-23 11:02:27 +01:00
Haitao Li
a936f78d98
rustc: Allow trailing comma in record fields
2011-11-22 13:41:17 -08:00
Stefan Plantikow
148a6c1a38
comp: allowed the declaration of pure fn's in native mods
...
This is especially useful for the native calls in std::math
This commit does NOT yet point to new snapshots
2011-11-22 20:01:25 +01:00
Marijn Haverbeke
fedb775fbb
Add hacks to extract and compile tutorial code
...
Not included in the build by default, since it's fragile and kludgy. Do
something like this to run it:
cd doc/tutorial
RUSTC=../../build/stage2/bin/rustc bash test.sh
Closes #1143
2011-11-22 16:12:23 +01:00
Marijn Haverbeke
5d6a74f020
Only warn about unreachable range patterns when appropriate
...
Also simplifies the literal-munging, and moves it into ast_util
Closes #1170
2011-11-22 11:49:29 +01:00
Marijn Haverbeke
8cc852af8c
Make ast::visit only descend into types when necessary
...
If visit_ty is not overridden, it uses a stub function which does not
descend into types.
Closes #1204
2011-11-22 10:57:47 +01:00
Haitao Li
5ca83553bc
rustc: Remove abi from ast::native_mod
2011-11-21 13:49:52 +01:00
Marijn Haverbeke
f6491bb426
Update stdlib, compiler, and tests to new kind system
...
This involved adding 'copy' to more generics than I hoped, but an
experiment with making it implicit showed that that way lies madness --
unless enforced, you will not remember to mark functions that don't
copy as not requiring copyable kind.
Issue #1177
2011-11-18 12:49:01 +01:00
Marijn Haverbeke
4e03112141
Add a pass-by-copy parameter passing convention
...
This is intended to solve the problem of how to pass arguments to
constructor functions -- you want to move in rvalues, but not have to
explicitly copy stuff that is not an rvalue. The by-copy passing
convention will ensure the callee gets its own copy of the value. For
rvalues, it'll just pass off the value. For lvalues, it'll make a
copy.
Issue #1177
2011-11-18 12:49:00 +01:00
Marijn Haverbeke
9cf48d3753
Preparation for kind system overhaul
...
This goes before a snapshot, so that subsequenct patches can make the
transition without breaking the build. Disables kind checking pass, makes
parser accept both new and old-style kind annotation.
Issue #1177
2011-11-18 10:52:28 +01:00
Niko Matsakis
adc79e2f44
remove compile-command from local variable blocks
2011-11-17 11:46:13 -08:00
Brian Anderson
b655fb9ea7
Replace 'mutable?' with 'const'
2011-11-16 14:41:32 -08:00
Brian Anderson
045a437556
rustc: Accept 'const' as synonym for 'mutable?'
2011-11-16 13:52:08 -08:00
Haitao Li
88f29aab27
Use attributes for native module ABI and link name
...
This patch changes how to specify ABI and link name of a native module.
Before:
native "cdecl" mod llvm = "rustllvm" {...}
After:
#[abi = "cdecl"]
#[link_name = "rustllvm"]
native mod llvm {...}
The old optional syntax for ABI and link name is no longer supported.
Fixes issue #547
2011-11-16 11:35:13 -08:00
Haitao Li
fba0df72d3
Use attributes for native module ABI and link name [temp]
...
This patch adds support of using attributes to specify native mode ABI
and link name. The old optional syntax like:
native "cdecl" mod llvm = "rustllvm" { ... }
is still supported.
This is a transitional commit to avoid making a stage1 (backward
imcompatible) snapshot.
2011-11-16 23:45:07 +08:00
Haitao Li
3b683f5205
rustc: Use link_name attribute for native function
...
Fixes issue #906
2011-11-16 23:45:07 +08:00
Haitao Li
5a7249c935
Cleanup unused imports
2011-11-10 19:19:40 -08:00
Josh Matthews
43cb74b830
Add float support to #fmt. Fix #1014 .
2011-11-10 11:40:34 -08:00
Brian Anderson
0d9e32d70d
Rename "c-stack-stdcall" ABI to "stdcall"
2011-11-09 18:45:25 -08:00
Brian Anderson
b7ab28b50f
Rename "c-stack-cdecl" ABI to "cdecl"
2011-11-09 18:44:12 -08:00
Brian Anderson
d26a96d2bb
Add "cdecl" as synonym for "c-stack-cdecl"
2011-11-09 16:47:44 -08:00
Brian Anderson
e96342820d
Add "stdcall" as synonym for "c-stack-stdcall"
2011-11-09 16:47:44 -08:00
Brian Anderson
1afc943c91
rustc: Rename native_abi_c_stack_cdecl to native_abi_cdecl
2011-11-09 16:47:44 -08:00
Brian Anderson
10c35959e7
rustc: Rename native_abi_c_stack_stdcall to native_abi_stdcall
2011-11-09 16:47:44 -08:00
Brian Anderson
c7f0ca6063
Remove native "x86stdcall" ABI
2011-11-09 16:47:43 -08:00
Brian Anderson
4f3f04643f
Remove native "cdecl" ABI
2011-11-08 17:17:06 -08:00
Brian Anderson
fcd39b1191
Remove native "llvm" ABI
2011-11-07 15:29:05 -08:00
Brian Anderson
1103fe8ca0
Remove native "rust" ABI
2011-11-07 15:14:10 -08:00
David Rajchenbach-Teller
16bdb85cb4
[Parser] parser.rs: Made two error messages less ambiguous
2011-11-07 12:04:16 -08:00
Marijn Haverbeke
1a68a98824
Disallow writing to function arguments again
...
Remove implicit copying hack.
Closes #1118
2011-11-03 10:57:54 +01:00
Marijn Haverbeke
eaf9e05611
Make 'lambda(...) -> ...' parse as a type
2011-11-02 12:20:11 +01:00
Brian Anderson
e0f44730e8
rustc: Support 'companion mod's for crates and directory mods
...
Under this scheme when parsing foo.rc the parser will also look for
foo.rs to fill in the crate-level module, and when evaluating a
directory module directive it will look for a .rs file with the
same name as the directory.
2011-10-29 01:40:20 -07:00
Brian Anderson
2cebef095e
stdlib: Make io failures recoverable by returning a result
2011-10-29 01:25:11 -07:00
Brian Anderson
83219269d5
rustc: Remove broken --depend flag
2011-10-28 12:58:10 -07:00
Brian Anderson
8da8a4a018
rustc: Extract error reporting from codemap
2011-10-28 11:43:07 -07:00
Marijn Haverbeke
7dacccde94
Make shared kind the default only for generic functions
...
You almost never want a function with pinned type params. For
types, objects, resources, and tags, pinned types are actually often
more sane. For most of these, shared rarely makes sense. Only tricky
case is objs -- you'll have to think about the kinds you want there.
Issue #1076
2011-10-28 17:00:14 +02:00
Marijn Haverbeke
6fe7aa4aff
Move to blocks, rather than fn@s, in parser.rs
2011-10-28 16:41:56 +02:00
Marijn Haverbeke
7a0aee74bf
Move to short type parameter keywords
...
Issue #1076
2011-10-28 15:25:33 +02:00
Marijn Haverbeke
cba4ddc6a4
Start accepting short keywords for parameter kinds
...
This is a pre-snapshot commit to be able to implement #1076 without
the bootstrap compiler getting in my way.
2011-10-28 14:57:35 +02:00
Brian Anderson
8222fa4e27
Use the std::term color constants in the codemap
...
Exported constants work now. Woo!
2011-10-27 13:52:00 -07:00
Marijn Haverbeke
cfdf193c46
Update our code to new type parameter kind syntax
...
Closes #1067
2011-10-25 15:56:55 +02:00
Marijn Haverbeke
58c82a8da2
Remove support for @/~-style type param kind annotation
...
Issue #1067
2011-10-25 15:50:45 +02:00
Marijn Haverbeke
2884c722fe
Step one towards new type param kind syntax
...
Issue #1067
Needs a snapshot to finalize.
2011-10-25 14:31:56 +02:00
Brian Anderson
81a44ccacf
Remove hack to break the AST fold cycle. Closes #998
2011-10-21 17:47:31 -07:00
Marijn Haverbeke
b0a72ee06a
Be more careful when parsing block calls
...
Previously, the parser would try to interpret this as a block call:
if true {} // No semicolon
{|i, am, a, block|};
Which, though unlikely, might come up in practice.
2011-10-21 14:55:54 +02:00
Marijn Haverbeke
7114702496
Change the way block calls are parsed, mark them as block-calls.
...
This makes it possible to omit the semicolon after the block, and will
cause the pretty-printer to properly print such calls (if
pretty-printing of blocks wasn't so broken). Block calls (with the
block outside of the parentheses) can now only occur at statement
level, and their value can not be used. When calling a block-style
function that returns a useful value, the block must be put insde the
parentheses.
Issue #1054
2011-10-21 14:24:14 +02:00
Marijn Haverbeke
0ce40f60e7
Drop support for iter, put, and for-each
...
Closes #1056
2011-10-21 13:47:24 +02:00