about summary refs log tree commit diff
path: root/src/comp/syntax
AgeCommit message (Collapse)AuthorLines
2011-07-25Recognize and preserve first blank line if first line of file.Graydon Hoare-5/+13
2011-07-25Rename the block type to be blk also. Sorry.Michael Sullivan-39/+39
2011-07-25Adjust pp interface to that printing a crate (an reproducing ↵Graydon Hoare-4/+8
literals/comments) takes a reader, not just a filename. Fixes first big pp-fuzzer bug.
2011-07-25Disallow block as a variable name in preparation for it becoming a keyword.Michael Sullivan-28/+29
2011-07-25Add support for bracey record types and literalsMarijn Haverbeke-8/+46
type foo = {mutable x: int, y: int}; auto myfoo = {mutable x: 10, y: 20u}; The old syntax is also still supported.
2011-07-25Add look-ahead to parser objectMarijn Haverbeke-34/+48
2011-07-25Make the lexer slightly less statefulMarijn Haverbeke-29/+25
2011-07-25Remove some rustboot-ismsMarijn Haverbeke-4/+3
Closes #464
2011-07-25Fix span information returned by parser::parse_seqMarijn Haverbeke-35/+33
Its hi pos used to be the end of the token after the sequence. It now properly reports the end of the closing token.
2011-07-22Add a "fake" def_upvar and mechanisms to create it.Michael Sullivan-0/+6
2011-07-22Implement Macro By Example.Paul Stansifer-210/+609
2011-07-22Start adding support for multiple variable declarations per stmtMarijn Haverbeke-21/+34
This adds parser support and most of the machinery for auto x = 10, y = 20; However, the above still goes wrong somewhere in typestate, causing the state checker to believe only the last variable in the list is initialized after the statement. Tim, if you have a moment, could you go over the changes to the tstate code in this patch and see where I'm going wrong? Multi-var-decls without the typestate extension Add a loop
2011-07-21Consolidate obj_field_from_anon_obj_field().Lindsey Kuper-0/+5
2011-07-21Remove vestiges of typarams from anon objs.Lindsey Kuper-12/+8
2011-07-21Make the pretty-printer output paren-free and case-free codeMarijn Haverbeke-19/+19
We should probably do another pretty-printing pass soon.
2011-07-20Parse nil literals (including in patterns)Tim Chevalier-0/+5
Closes #622.
2011-07-19Beginnings of support for constrained typesTim Chevalier-76/+131
Programs with constrained types now parse and typecheck, but typestate doesn't check them specially, so the one relevant test case so far is XFAILed. Also rewrote all of the constraint-related data structures in the process (again), for some reason. I got rid of a superfluous data structure in the context that was mapping front-end constraints to resolved constraints, instead handling constraints in the same way in which everything else gets resolved.
2011-07-19Simple refactoring in the pretty printer.Michael Sullivan-7/+10
Introduce a proto_to_str function to find the string representation of a given proto instead of casing on the proto in multiple places.
2011-07-18Support x86 stdcall conventionBrian Anderson-0/+3
This allows rust to call the Win32 API
2011-07-16Make clear the differentiation between char pos and byte pos in filemaps. ↵Josh Matthews-33/+63
Fix up error printing for files with multi-byte characters.
2011-07-16Fix pre-existing problem with filemap line positions always starting at 0. ↵Josh Matthews-4/+12
Fix error line output to only retrieve up to the nearest newline.
2011-07-16Use the actual start position of the file in the codemap rather than the ↵Josh Matthews-4/+2
position of the first newline.
2011-07-16Reenable error line printing.Josh Matthews-2/+1
2011-07-16Fix error line display slicing.Josh Matthews-5/+7
2011-07-15rustc: Remove a bunch of exterior vectorsPatrick Walton-147/+108
2011-07-14rustc: Move much of metadata reading over to interior vectorsPatrick Walton-30/+31
2011-07-13Prohibit trailing whitespace under 'tidy' script. Clean up all caught cases.Graydon Hoare-93/+93
2011-07-13Parse nullary ret correctlyTim Chevalier-9/+7
ret is similar to fail: if not followed by an expression, it should be parsed as a ret without an argument. The old version would fail if ret was followed by a close paren (for example). Fixed it. Closes #676.
2011-07-13Add some missing cases to token::can_begin_exprTim Chevalier-0/+4
2011-07-13box patterns, expect for the trans partMarijn Haverbeke-3/+17
2011-07-12Fix fast-check target by disabling code snippet printing on warnings (broken ↵Graydon Hoare-1/+4
on .rc files) and adding an xfail-fast flag for global-scope.rs.
2011-07-12Elide existing main function when building a test runner. Issue #428Brian Anderson-0/+1
This prevents any defined main function from colliding with the one synthesized for the test runner. This is not the best solution since it doesn't compile a function the user defined, but I don't think it's likely to be a problem in the near term.
2011-07-12rustc: Remove some interior vectors from typestate and some useless ↵Patrick Walton-2/+0
vec-related imports
2011-07-12rustc: Move ppaux away from exterior vectorsPatrick Walton-8/+2
2011-07-12rustc: Complete the transition of pprust to interior vectorsPatrick Walton-80/+48
2011-07-12Update pretty-printing of '...' in record patterns to be ', _' insteadMarijn Haverbeke-1/+4
2011-07-11Fix pretty-printing of literals again. Issue #672Brian Anderson-1/+6
The pos variable is one character beyond where I thought it was.
2011-07-11Make the parser add correct spans to view_itemsTim Chevalier-30/+19
Closes #650.
2011-07-11So... I can't spell 'ellipsis'.Paul Stansifer-8/+8
2011-07-11Change "etc" syntax for record patterns from `{a:b ...}` to `{a:b, _}`.Paul Stansifer-5/+6
2011-07-11Add elipses, reorganize the macro components into their own AST node.Paul Stansifer-99/+202
2011-07-11Move macro expansion to a separate phase, change macro syntax, and add ↵Paul Stansifer-143/+298
parse_sess to session.
2011-07-11Add nodes for embedding types and blocks in expressions for macros.Paul Stansifer-45/+58
2011-07-11Only print up to six lines on error. Print ^~~~~ to highlight error span.Josh Matthews-1/+49
2011-07-11Hack to print lines when error spans are available.Josh Matthews-2/+55
2011-07-11Visit the type argument in a port expressionTim Chevalier-1/+8
This closes #664.
2011-07-11Add parser::parse_crate_from_source_strBrian Anderson-0/+18
The fuzzer wants to be able to do stuff like this
2011-07-11Pull lexer creation out of new_parserBrian Anderson-15/+20
This will allow custom lexers to be injected into the parser (for fuzzing)
2011-07-11Pull file reading out of the lexerBrian Anderson-10/+11
2011-07-11rustc: Implement explicit global scope resolution via leading "::"; add a ↵Patrick Walton-9/+22
test case