about summary refs log tree commit diff
path: root/src/comp/syntax/print
AgeCommit message (Collapse)AuthorLines
2012-03-02Move src/comp to src/rustcGraydon Hoare-2319/+0
2012-03-02core: Remove _mut functions from vecBrian Anderson-3/+3
Instead, use vec::to_mut/from_mut to transform vectors in place as needed.
2012-02-24Encode/decode AST into metadata, re-instantiate inlined itemsNiko Matsakis-0/+2
2012-02-23(core::str) remove len_bytes aliasKevin Cantu-4/+4
2012-02-23(core::str) mostly rename len -> len_charsKevin Cantu-2/+2
2012-02-22Clean up small things in syntax submodulesMarijn Haverbeke-48/+24
2012-02-21rustc: Generate crates with #astBrian Anderson-0/+4
2012-02-17Refactor view_path to parse (but not yet process) export globs, unify code ↵Graydon Hoare-45/+44
paths.
2012-02-15make mut a keyword synonymous with mutableNiko Matsakis-15/+15
first step towards issue #1273
2012-02-15Rewrite exhaustiveness checkerMarijn Haverbeke-1/+1
Issue #352 Closes #1720 The old checker would happily accept things like 'alt x { @some(a) { a } }'. It now properly descends into patterns, checks exhaustiveness of booleans, and complains when number/string patterns aren't exhaustive.
2012-02-15Support 'alt check' syntaxMarijn Haverbeke-1/+2
It is only a way to flag an alt as intentionally non-exhaustive right now. Issue #1679
2012-02-14rustc: Add crust functions to the ASTBrian Anderson-0/+1
2012-02-12(core::str) rename byte_len -> len_bytes and rename char_len -> lenKevin Cantu-4/+4
2012-02-11make bind syntax unnecessary: just use _ for one of the argumentsNiko Matsakis-1/+6
2012-02-10Remove a vestige of return-by-referenceMarijn Haverbeke-3/+1
2012-02-09Remove some pointless importsMarijn Haverbeke-5/+0
2012-02-07Minor class-related tweaks to the ASTTim Chevalier-2/+2
2012-02-06Handle built-in typenames in the resolve pass, rather than in parserMarijn Haverbeke-11/+2
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-05infer modes rather than overwriting with expected tyNiko Matsakis-8/+13
2012-02-03Beginnings of front-end support for classesTim Chevalier-1/+46
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-4/+12
2012-02-03Make macro arg optional in syntax, again untested.Kevin Atkinson-2/+5
2012-02-03Add support for parsing quasi-quotes, doesn't do anything useful yet.Kevin Atkinson-0/+2
2012-02-01rustdoc: Add support for type itemsBrian Anderson-1/+5
2012-02-01Remove support for native typesMarijn Haverbeke-10/+0
Issue #1673
2012-01-31Change option::t to optionTim Chevalier-11/+11
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-22/+11
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-3/+4
2012-01-30Remove ternary operatorPaul Woolcock-14/+4
`expr_ternary`, `ternary_to_if`, and all parses & lexer definitions have been removed.
2012-01-30Revert self typesMarijn Haverbeke-2/+1
2012-01-26rustc: Add pprust::res_to_strBrian Anderson-8/+41
2012-01-25rustc: Add pprust::variant_to_strBrian Anderson-17/+39
2012-01-25rustc: Allow attributes on enum variants. Closes #1663Brian Anderson-0/+1
2012-01-25Implement implicit self type parameters for ifacesMarijn Haverbeke-1/+2
Closes #1661
2012-01-25Rename tag to enum throughout the compilerMarijn Haverbeke-4/+4
This should reduce confusion of people trying to read the code.
2012-01-24rustc: Split diagnostics into "span diagnostics" and "diagnostics".Patrick Walton-2/+3
The former contain a codemap (which is per-crate), and the latter don't. This will be useful in order to allow more than one crate to be compiled in one run of the compiler.
2012-01-23s/block()/fn()/gNiko Matsakis-3/+3
2012-01-23Export all enum variants by default; new syntax for selectively exporting ↵Tim Chevalier-0/+13
variants See issue 1426 for details. Now, the semantics of "export t;" where t is a tag are to export all of t's variants as well. "export t{};" exports t but not its variants, while "export t{a, b, c};" exports only variants a, b, c of t. To do: - documentation - there's currently no checking that a, b, c are actually variants of t in the above example - there's also no checking that t is an enum type, in the second two examples above - change the modules listed in issue 1426 that should have the old export semantics to use the t{} syntax I deleted the test export-no-tag-variants since we're doing the opposite now, and other tests cover the same behavior.
2012-01-21issue #1352: change param order on vec::init_elt, putting block in final ↵Graham Fawcett-3/+3
position. To match the init_fn() and init_fn_mut() changes.
2012-01-19rustc: Make the pretty printer output commas after enum variants. Update all ↵Patrick Walton-1/+1
tests accordingly.
2012-01-19rustc: Fix fun_to_strBrian Anderson-0/+14
2012-01-19rustc: ";" to "," in enumsPatrick Walton-8/+8
2012-01-19rustc: "tag" -> "enum"Patrick Walton-6/+6
2012-01-19Rename fn*() to fn() as originally planned.Niko Matsakis-1/+1
2012-01-19Remove support for the '.' after a nullary tag in a patternTim Chevalier-13/+13
(Commit also includes lots of changes to remove '.'s that a git merge messed up, or else it was monkeys.)
2012-01-18Remove '.' after nullary tags in patternsTim Chevalier-61/+61
Does what it says on the tin. The next commit will remove support for this syntax.
2012-01-17Allow omission of the '.' after nullary tag patternsTim Chevalier-3/+5
This commit allows patterns like: alt x { some(_) { ... } none { } } without the '.' after none. The parser suspends judgment about whether a bare ident is a tag or a new bound variable; instead, the resolver disambiguates. This means that any code after resolution that pattern-matches on patterns needs to call pat_util::normalize_pat, which consults an environment to do this disambiguation. In addition, local variables are no longer allowed to shadow tag names, so this required changing some code (e.g. renaming variables named "mut", and renaming ast::sub to subtract). The parser currently accepts patterns with and without the '.'. Once the compiler and libraries are changed, it will no longer accept the '.'.
2012-01-16Be more careful about pretty-printing literalsMarijn Haverbeke-12/+19
Before, literal printing would basically get derailed completely when a literal was encountered that did not end up being printed. This caused the strangeness seen in #1532. Also cleans up pretty-printing of discriminants a little. Closes #1510 Closes #1532
2012-01-16Update pretty printer to print out disr. values.Kevin Atkinson-0/+8
Partly fixes issue #1510. "rustc --pretty=typed" fails.
2012-01-15rustc: Parse fn inner attributes. Closes #1506Brian Anderson-1/+13