about summary refs log tree commit diff
path: root/src/comp/syntax
AgeCommit message (Collapse)AuthorLines
2012-02-10Output meaningful lexer error when no digits given for numberMarijn Haverbeke-0/+6
Closes #1802
2012-02-09Remove some pointless importsMarijn Haverbeke-40/+0
2012-02-09Increase precedence of as operatorMarijn Haverbeke-6/+6
Closes #1717
2012-02-08A bit more WIP on classes, and some cleanup in resolveTim Chevalier-13/+19
2012-02-07Restore a comment that got lost (comments only)Tim Chevalier-1/+1
2012-02-07Minor class-related tweaks to the ASTTim Chevalier-18/+32
2012-02-06Make keyword table in reference reflect reality more closelyMarijn Haverbeke-6/+6
And remove the part about reserved words.
2012-02-06Handle built-in typenames in the resolve pass, rather than in parserMarijn Haverbeke-76/+31
Closes #1728 Comments out a section of debuginfo.rs. This code was already broken (only being called when --xg was passed, and only working on trivial programs).
2012-02-06Removed sendfn from badwords and made the precedence of XOR between that of ↵Ian D. Bollinger-2/+2
OR and AND.
2012-02-06Self types for ifacesMarijn Haverbeke-3/+1
This allows a 'Name:' to appear in front of an iface declaration's name, which will cause 'Name' to refer to the self type (with the same number of type parameters as the iface has) in the method signatures of the iface. For example: iface F: functor<A> { fn fmap<B>(f: fn(A) -> B) -> F<B>; } Issue #1718
2012-02-06Allow non-semicolon-requiring expressions to be followed by .fieldMarijn Haverbeke-22/+22
There is no valid expression that starts with a dot token (.5 is a number token), so this introduces no ambiguities. Issue #1716
2012-02-05Fix macro backtraces.Kevin Atkinson-58/+58
In addition add information about the macro doing the expansion, and move the printing of the expansion backtrace from codemap::span_to_str to the diagnostic code. The backtrace is now more verbose and includes information on the macro doing the expansion, in addition to the expansion site.
2012-02-05Remove support for $(...) form of quasi-quotes, use #ast{...} instead.Kevin Atkinson-28/+4
2012-02-05infer modes rather than overwriting with expected tyNiko Matsakis-19/+39
2012-02-03Beginnings of front-end support for classesTim Chevalier-7/+247
Added class support to the parser, prettyprinter, fold, and visit. (See Issue 1726.) This is WIP -- the test case is xfailed, and attempting to compile it will error out in resolve.
2012-02-03Fix various drift issues in the qq branch.Graydon Hoare-29/+27
2012-02-03Implement folding of ast::ty.Kevin Atkinson-3/+30
2012-02-03Fix q-q so that non-expression q-q actually work when there is embed anti-q.Kevin Atkinson-7/+21
2012-02-03Allow anti-quotes to also be ast::ty rather than just ast::expr.Kevin Atkinson-14/+74
2012-02-03Implement quasi-quoting of multiple syntatic categories.Kevin Atkinson-24/+114
2012-02-03Formatting cleanups.Kevin Atkinson-11/+13
2012-02-03Store info about file "substr".Kevin Atkinson-14/+38
That is when a string that is part of a file needs to be parsed for a reason, record that the string is a substr of the file rather than using "<anon>" or "-" as the file name. This will eventually allow pointing to the right location, for now it just uses a more meaningful string for the filename.
2012-02-03Implement quasi-quotes in more macro form: #ast{...}.Kevin Atkinson-5/+38
The #(...) form is still supported for now.
2012-02-03Don't rely on filename to get a file from the filemapKevin Atkinson-9/+15
as there may be more than one filemap with the same filename (in the case of stdin for instance). This involved storing a pointer to the filemap rather than the filename in location info such as codemap::pos.
2012-02-03Bug fix in lookup_byte_offset.Kevin Atkinson-1/+1
2012-02-03Make macro arg optional in syntax, again untested.Kevin Atkinson-14/+41
2012-02-03Add support for recognizing macro body, completely untested.Kevin Atkinson-16/+43
2012-02-03Change the type for the macro body to also store the span.Kevin Atkinson-10/+13
Note: the body is the part of the macro syntax between the {}.
2012-02-03When replacing $(...) with $0 preserve spacing for better error messages.Kevin Atkinson-7/+19
That is: x + $(foo) + y becomes: x + $0 + y not: x + $0 + y
2012-02-03Expand result of quasi-quote.Kevin Atkinson-3/+9
2012-02-03Implement anti-quotes.Kevin Atkinson-12/+93
2012-02-03Implement "replace" function.Kevin Atkinson-1/+23
2012-02-03Implement basic quasi-quoter. No anti-quotes yet.Kevin Atkinson-7/+39
2012-02-03Rename AST builders to use uniform naming scheme. Also add a few more.Kevin Atkinson-46/+68
2012-02-03Add support for parsing quasi-quotes, doesn't do anything useful yet.Kevin Atkinson-1/+72
2012-02-03Move useful ast building functions into their own module.Kevin Atkinson-39/+49
2012-02-03Add function to get a code snippet from a span,Kevin Atkinson-3/+40
and also to get the byte offset within a string from a span chpos.
2012-02-01rustdoc: Add support for type itemsBrian Anderson-1/+5
2012-02-01Rename (again) str::unsafe::slice -> str::unsafe::slice_bytes andKevin Cantu-4/+4
str::unsafe::safe_slice -> str::unsafe::slice_bytes_safe_range
2012-02-01Propagating unsafe::slice 3Kevin Cantu-4/+5
2012-02-01Propagating unsafe::slice 2Kevin Cantu-4/+4
2012-02-01make boxes self-describing (fixes #1493)" (take 2)Niko Matsakis-0/+2
this will be used to generate a new snapshot.
2012-02-01Revert "make boxes self-describing (fixes #1493)" until a newNiko Matsakis-2/+0
snapshot is prepared.
2012-02-01make boxes self-describing (fixes #1493)Niko Matsakis-0/+2
2012-02-01Remove support for native typesMarijn Haverbeke-31/+2
Issue #1673
2012-01-31Change option::t to optionTim Chevalier-66/+66
Now that core exports "option" as a synonym for option::t, search-and- replace option::t with option. The only place that still refers to option::t are the modules in libcore that use option, because fixing this requires a new snapshot (forthcoming).
2012-01-31Require alts to be exhaustiveTim Chevalier-48/+57
middle::check_alt does the work. Lots of changes to add default cases into alts that were previously inexhaustive.
2012-01-30rustc: Allow attributes on methods. Closes #1709Brian Anderson-8/+14
2012-01-30Remove ternary operatorPaul Woolcock-61/+5
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have been removed.
2012-01-30Change all ternary ops to if/then/elsePaul Woolcock-24/+80
All the files below had at least one instance of the ternary operator present in the source. All have been changed to the equivalent if/then/else expression.