summary refs log tree commit diff
path: root/src/comp/syntax
AgeCommit message (Collapse)AuthorLines
2012-01-09Remove proto_sugar and 'lambda' as keyword, commit to fn@.Graydon Hoare-15/+9
2012-01-09Make the parser accept 'if' as an alternative to 'when' in alt patterns.Austin Seipp-2/+6
Also fix the pretty printer, making it output 'if' instead of 'when'. Issue #1396
2012-01-06Fix pretty-printing of ty params in iface methodsMarijn Haverbeke-3/+5
2012-01-05fix pretty printer to correctly insert parens for disambNiko Matsakis-35/+5
2012-01-05require a non-semi expr acting as a stmt to have unit return typeNiko Matsakis-15/+28
2012-01-05make parser handle parenthesized block-sugar exprs properlyNiko Matsakis-81/+114
2012-01-05Switch to new param kind bound syntaxMarijn Haverbeke-16/+14
And remove support for the old syntax
2012-01-05Fix bad spans for ast::ty parsingMarijn Haverbeke-9/+6
The span would be pointing after the actual text.
2012-01-04Add visit_ty_params to visit.rsMarijn Haverbeke-7/+16
And use it to make typechecking of bounds less error-prone.
2012-01-03Allow tail expressions even in no_value blocks. Type checkerNiko Matsakis-30/+46
will guarantee they have unit type.
2012-01-03extend parser so that expressions that do not require semi-colonsNiko Matsakis-2/+2
to be statements are not considered expressions in the tail position
2012-01-03rewrite to put blk as 2nd argNiko Matsakis-1/+1
2012-01-03minimal changes to permit fn blocks in exprNiko Matsakis-68/+64
2012-01-03Make syntax for impls less magicalMarijn Haverbeke-23/+18
The trick of interpreting parameters to the iface type as parameters to the impl was just too magical. Issue #1227
2011-12-30add cap clause to pretty printer, with a testNiko Matsakis-2/+34
2011-12-29split proto from fn_decl, as not all fn_decls know the proto.Niko Matsakis-85/+89
this will address the (crashing) new test added.
2011-12-29Add support in lexer for utf8 identifiers. No NFKC logic in char yet.Graydon Hoare-2/+4
2011-12-28Merge pull request #1389 from erickt/masterGraydon Hoare-1/+1
misc standard library additions
2011-12-28Move the kind datatype to middle::tyMarijn Haverbeke-30/+0
The AST no longer references it.
2011-12-28Change representation of type params to handle interface boundsMarijn Haverbeke-38/+65
Issue #1227
2011-12-28comp: minor cleanup.Erick Tryzelaar-1/+1
2011-12-23Go back to a single visit_fn function in visit.rsMarijn Haverbeke-49/+21
2011-12-23Get rid of visit_fn_block in visit.rsMarijn Haverbeke-23/+2
It seems redundant and error-prone.
2011-12-23Check impls methods against the type of their iface.Marijn Haverbeke-9/+9
2011-12-23Parse `iface` items and interface references in `impl` items.Marijn Haverbeke-75/+110
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-23Make ast::ty_method hold a fn_decl, rather than duplicating its fieldsMarijn Haverbeke-33/+14
2011-12-22Register new snapshots, purge log_err and log_full in favour of log(...).Graydon Hoare-17/+13
2011-12-22Switch core macros to expand to log(level, ...).Graydon Hoare-4/+4
2011-12-22Merge all 3 log syntaxes, tidy up residual misuses.Graydon Hoare-17/+12
2011-12-22Merge branch 'master' of github.com:graydon/rustGraydon Hoare-174/+147
2011-12-22Register snapshots and switch logging over to use of log_full or #error / ↵Graydon Hoare-64/+68
#debug.
2011-12-22Work around unwinding bugMarijn Haverbeke-1/+2
See issue #1374
2011-12-22Unify some data structures in syntax::ast that were doing the same thingMarijn Haverbeke-174/+146
As a preparation to removing some duplication in typeck.
2011-12-22Revert all of yesterday's snapshots and try again. Cursed!Graydon Hoare-4/+4
2011-12-22Merge branch 'master' of github.com:graydon/rustGraydon Hoare-18/+1
2011-12-22Remove trivial cast checkerMarijn Haverbeke-18/+1
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-21More flailing on log syntax due to call-expr ambiguity in previous attempt.Graydon Hoare-2/+9
2011-12-21Out-of-order-code typo. Snapshot again.Graydon Hoare-1/+1
2011-12-21Switch log_expr to carrying a full expr:u32 for level. Add log_full variant ↵Graydon Hoare-12/+38
that parses that expr, prepare for snapshot.
2011-12-21upgrade kind checkNiko Matsakis-0/+1
2011-12-21update pprinter to understand ret type of block, add warningsNiko Matsakis-0/+5
2011-12-21Make { || ... } sugar for any type of closure, inferredNiko Matsakis-58/+103
2011-12-21rustc: Exclude stdin from codemap files when lookup_posHaitao Li-3/+5
Fixes issue #1362
2011-12-20Inject "core macros" into default syntax-expansion environment. Bit of a ↵Graydon Hoare-21/+48
kludge but enough to work on logging-via-macros.
2011-12-19implement capture clauses (move, in particular) and integrateNiko Matsakis-0/+4
them into type state and so forth
2011-12-19resolve capture clausesNiko Matsakis-20/+19
2011-12-19Add type argument field to expr_pathMarijn Haverbeke-6/+20
This way, you can explicitly provide type parameters when calling a generic method. Issue #1227
2011-12-19Use quotes around tokens in parser error messages to make them more readableMarijn Haverbeke-12/+12
Closes #1328
2011-12-18Only look for a matching method when normal field access failsMarijn Haverbeke-5/+3
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-16Reserve node_id 0 for the crate top-level moduleMarijn Haverbeke-0/+1
And define a const to refer to it.