Brian Anderson
478134354d
rustc: Rename the lexer's err message to fatal and make it fail
2012-01-13 22:07:55 -08:00
Brian Anderson
f4bd03b998
rustc: Replace the lexer's error handling with diagnostic impl
2012-01-13 22:07:55 -08:00
Brian Anderson
e90701c546
rustc: Replace parser's error handling with diagnostic impl
2012-01-13 22:07:55 -08:00
Brian Anderson
ced0aa13d3
rustc: Extract driver::diagnostic from syntax::codemap
2012-01-13 16:06:56 -08:00
Brian Anderson
bb1e8d2339
rustc: Some more codemap refactoring
2012-01-13 15:52:03 -08:00
Brian Anderson
f26266e03d
rustc: Refactor codemap::emit_* functions
...
A codemap is only needed when we have a span so put them both into the option.
2012-01-13 15:52:03 -08:00
Graydon Hoare
91b0a51290
Change builtin macro defs to use #macro()
2012-01-13 15:43:12 -08:00
Niko Matsakis
8685a1f7c4
distinguish "any closure" and "stack closure" (block)
2012-01-13 09:31:40 -08:00
Niko Matsakis
47a534c197
make blocks fn& and fn stand for "any closure"
2012-01-13 06:36:31 -08:00
Niko Matsakis
3f3bfeec27
make "native fn" the type for bare functions, remove fn exprs
2012-01-13 06:27:35 -08:00
Niko Matsakis
455f8b0d45
deprecate fn exprs and the fn() type, preferring fn@ and native fn
2012-01-13 06:27:34 -08:00
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