about summary refs log tree commit diff
path: root/src/comp/syntax/print
AgeCommit message (Collapse)AuthorLines
2011-09-21Revert "Implement pattern ranges for all numeric types."Marijn Haverbeke-6/+0
This reverts commit ce0f054f9d56df4e60291fc2e1b89ce979cf374f.
2011-09-21Implement pattern ranges for all numeric types.Josh Matthews-0/+6
2011-09-20Represent unique creation as a unop in the AST instead of its own exprBrian Anderson-3/+2
Like the box unop. Issue #409
2011-09-20Parse unique box typesBrian Anderson-0/+1
Issue #409
2011-09-16Require body of else-less if expressions to be a value-less blockMarijn Haverbeke-3/+3
For consistency with other constructs that could not possibly return a value (say, loops).
2011-09-15Add parens, as needed, around else-if conditions.Jesse Ruderman-1/+1
2011-09-15Require the parameter that will be referenced to be notedMarijn Haverbeke-2/+10
Issue #918
2011-09-15Add representation for by-ref let bindingsMarijn Haverbeke-1/+3
Issue #918
2011-09-15Ensure parens are wrapped around composite exprs in call/index/field posMarijn Haverbeke-5/+10
This is needed to fix the second example in issue #919
2011-09-15More thorough check for (.. 10).x in pretty-printerMarijn Haverbeke-5/+21
Closes #919
2011-09-15Also handle fail and put in print_maybe_parens_discrimMarijn Haverbeke-2/+5
Closes #920
2011-09-15Remove maybe_protect_block kludge from pretty-printerMarijn Haverbeke-86/+0
It is no longer needed.
2011-09-15Insert omitted semicolons for statementsMarijn Haverbeke-2/+1
2011-09-14Add syntax and representation for return-by-mutably-rooted-refMarijn Haverbeke-2/+8
This will be used in the near future to decide what can safely be done with the returned reference. Issue #918
2011-09-14Make most of the compiler aware of return-by-referenceMarijn Haverbeke-3/+6
tyencode/tydecode still don't know about it. return_ref will be extended to take arguments anyway.
2011-09-14Rename ast::controlflow to ast::ret_styleMarijn Haverbeke-2/+2
It will include information about returning by alias.
2011-09-13Properly pretty-print 10.xMarijn Haverbeke-1/+9
Closes #890
2011-09-13Make pretty-printer wrap fail/ret/put in parens in call/index/field posMarijn Haverbeke-10/+14
Closes #764 Closes #891
2011-09-12Factor imports mindlessly.Graydon Hoare-23/+6
2011-09-12Pretty-print for new arg-mode syntaxMarijn Haverbeke-0/+4
2011-09-12Switch pretty-printer to new arg-mode syntaxMarijn Haverbeke-2/+2
2011-09-12Reformat for new mode syntax, step 1Marijn Haverbeke-137/+136
Long lines were fixed in a very crude way, as I'll be following up with another reformat in a bit.
2011-09-12Make the names of the arg mode tag reflect their (revised) meaningMarijn Haverbeke-4/+3
2011-09-09Make the pretty printer disambiguatae blocks followed by vec expressions.Jesse Ruderman-2/+4
Semicolons are needed here now that postfix [] is used for vec indexing (the syntax change made in rev 518dc52f85c2efb67aaa1208c02e9a7e0bdaca49).
2011-09-02Rename ty_istr to ty_str. Issue #855Brian Anderson-1/+1
2011-09-02Reformat. Issue #855Brian Anderson-326/+288
2011-09-01Remove lots of estr code from rustc. Issue #855Brian Anderson-2/+1
2011-09-01Convert all uses of #ifmt to #fmt. Issue #855Brian Anderson-19/+19
2011-09-01Rename std::istr to std::str. Issue #855Brian Anderson-12/+12
2011-09-01Parse "",str as istrs. Pretty print istrs as "",str. Issue #855Brian Anderson-8/+1
2011-09-01Remove std::str. Issue #855Brian Anderson-2/+0
2011-08-31Convert uses of #fmt to #ifmt. Issue #855Brian Anderson-22/+20
2011-08-27Convert rustc::syntax::ast_util to istrs. Issue #855Brian Anderson-6/+6
2011-08-27Convert pretty-printer to istrs. Issue #855Brian Anderson-318/+328
2011-08-27Convert lexer to istrs. Issue #855Brian Anderson-8/+13
2011-08-27Convert rest of the AST to istrs. Issue #855Brian Anderson-6/+10
2011-08-27Convert ast::ident to istr. Issue #855Brian Anderson-45/+59
2011-08-27Convert std::io to istrs. Issue #855Brian Anderson-7/+7
2011-08-27Convert std::int to istrs. Issue #855Brian Anderson-2/+2
2011-08-27Convert std::uint to istrs. Issue #855Brian Anderson-2/+3
2011-08-25Support unchecked blocksTim Chevalier-0/+5
This patch supports the syntax unchecked { ... } to disable purity checking within a block. Presumably it will only be used within a declared "pure fn". However, there is no checking that it doesn't occur elsewhere, and it would be harmless for it to do so. I went with Lindsey's suggestion for the syntax, but it's subject to change. This allows you to write code that uses predicates that call arbitrary Rust functions, but you must declare your intentions by wrapping it in an unchecked { ... } block. The test case run-pass/unchecked-predicates.rs demonstrates how to do that.
2011-08-24Change "pred" to "pure fn" (but still accept "pred")Tim Chevalier-1/+1
This is part 1 of changing the "pred" keyword to "pure fn". Right now, the compiler accepts both "pred" and "pure fn".
2011-08-23Fix pretty-printing of istr literals. Issue #855Brian Anderson-1/+11
2011-08-22Move functions from syntax::ast to syntax::ast_utilBrian Anderson-6/+7
This leaves syntax::ast just defining the AST, which strikes me as somewhat nicer
2011-08-22Implement pattern guardsMarijn Haverbeke-0/+8
The syntax is alt x { mypat where mycond { ... } } The condition may refer to any of the variables bound by the pattern. When a guard fails, pattern-matching continues with the next pattern. Closes #857
2011-08-20ReformatBrian Anderson-219/+182
This changes the indexing syntax from .() to [], the vector syntax from ~[] to [] and the extension syntax from #fmt() to #fmt[]
2011-08-19Pretty-print new index syntaxBrian Anderson-3/+2
2011-08-19Pretty-print constrained types correctlyBrian Anderson-1/+6
2011-08-19Pretty-print parens around more things that need disambiguationBrian Anderson-7/+17
Ridiculous stuff like (ret 0) == (log "error")
2011-08-19Teach the pretty-printer to disambiguate 'if ret { }' et. alBrian Anderson-3/+15