Brian Anderson
7d05da96f7
Rename std::ioivec to std::io
2011-08-12 12:08:27 -07:00
Brian Anderson
740196987e
Rename std::str::unsafe_from_bytes_ivec to unsafe_from_bytes
2011-08-12 12:08:27 -07:00
Brian Anderson
a9ce342fa3
Convert all uses of unsafe_from_bytes to unsafe_from_bytes_ivec
2011-08-12 12:08:26 -07:00
Brian Anderson
49b80f9bf7
Remove str::from_bytes
...
This is exactly the same as str::unsafe_from_bytes
2011-08-12 12:08:26 -07:00
Michael Sullivan
67e361a940
Introduce a ty_infer ast node and use it instead of option::t[ty].
...
This actually basically makes things worse, since we get less nice
type system guarentees but it will make doing type inferred blocks a
fair deal less painful. I'm not /really/ happy about this...
2011-08-10 20:18:07 -07:00
Michael Sullivan
43c9fe65bd
Eliminate the last vestiges of init_recv.
2011-08-10 19:21:29 -07:00
Erick Tryzelaar
8b15045224
Port the compiler to the ivec type [T] syntax.
2011-08-09 15:53:26 -07:00
Erick Tryzelaar
a37e00ed1f
Change the ivec type syntax to [T].
...
This preserves the old syntax for now.
2011-08-09 11:29:36 -07:00
Graydon Hoare
b54e7e4506
Add new arg-passing mode 'move' denoted with '-T'. Translate as pass-by-value, doesn't deinit source yet nor get proper analysis in typestate, alias passes.
2011-08-08 15:53:41 -07:00
Michael Sullivan
5ea8d7f467
Make the pretty printer put trailing newlines at the end of files.
2011-08-03 17:52:25 -07:00
Brian Anderson
0b7a94a94c
Pretty-print kinds of type params
2011-08-03 10:55:59 -07:00
Brian Anderson
843767a841
Disambiguate unop statements in pretty-printer. Closes #674
2011-08-03 10:55:59 -07:00
Brian Anderson
2911156820
Pretty-print fn constraints more correctish
2011-08-02 17:49:11 -07:00
Brian Anderson
3eef9993af
Don't pp extra lines after block open when preserving whitespace. Closes #759
2011-08-02 17:49:11 -07:00
Marijn Haverbeke
985c32ef4c
Partially implement destructuring locals
...
You can now say
let {bcx, val} = some_result_returner();
Similar for loop variables. Assigning to such variables is not safe
yet. Function arguments also remain a TODO.
2011-08-01 17:51:37 +02:00
Marijn Haverbeke
b1d2a00b4a
Remove support for obj dtors
2011-07-29 14:03:24 +02:00
Lindsey Kuper
b24da1c2e5
The names 'outer' and 'inner' make more sense than 'self' and 'with'.
...
(Also, some formatting and long-string cleanup.)
2011-07-28 14:54:32 -07:00
Paul Stansifer
86f337484e
Change macro syntax to accept a single expr, not a sequence of exprs.
2011-07-28 12:12:08 -07:00
Graydon Hoare
acac6abc85
Parse, store and print type parameter kind constraints.
2011-07-28 17:22:59 +00:00
Marijn Haverbeke
0186176ae9
Stop outputting spurious spaces in ivec types and empty mutable vecs
...
(in the pretty-printer)
2011-07-27 21:20:51 +02:00
Marijn Haverbeke
06e1d8b745
Remove superfluous spaces in pretty-printing of loops
...
(And extra parens around else-if tests)
2011-07-27 17:18:53 +02:00
Marijn Haverbeke
66b84e3f55
Make the pretty-printer output whitespace before obj drop clause
2011-07-27 16:54:48 +02:00
Marijn Haverbeke
0334faef1f
Improve pretty-printing of constraints
...
(Methods still don't seem to have constraints associated with them.
Method types do, so I guess this is a TODO.)
2011-07-27 16:50:51 +02:00
Marijn Haverbeke
19394a50e7
Make printing of comments inside bindings slightly less broken
2011-07-27 16:24:41 +02:00
Marijn Haverbeke
df7f21db09
Reformat for new syntax
2011-07-27 15:54:33 +02:00
Marijn Haverbeke
300eb30113
Output native_name field for native mods when needed
2011-07-27 15:19:31 +02:00
Marijn Haverbeke
e9b2487db7
Have the pretty-printer parentesize unary ops when needed
2011-07-27 15:19:31 +02:00
Marijn Haverbeke
a6260ebaa2
Update the pretty-printer to output the new syntax
2011-07-27 15:19:31 +02:00
Marijn Haverbeke
557c2a380a
Parenthesize ivec types as needed
2011-07-27 15:19:31 +02:00
Graydon Hoare
797cd9fd0e
Try to keep the local and its type together when wrapping a long decl.
2011-07-26 16:28:16 -07:00
Graydon Hoare
4070b75914
Prohibit breaking between "let" and "=" in local decls.
2011-07-26 15:58:50 -07:00
Graydon Hoare
821c1e7a44
Trailing whitespace.
2011-07-26 15:41:43 -07:00
Graydon Hoare
ba626779de
Handle printing 'auto' occurring in loop-variable context.
2011-07-26 15:41:42 -07:00
Graydon Hoare
1c97510a16
Improve printing of mod and native mod.
2011-07-26 15:41:42 -07:00
Graydon Hoare
69f8d0e787
Handle hardbreaks at bol slightly better, including break_offset calls (tuck offset into previous hardbreak).
2011-07-26 15:41:42 -07:00
Michael Sullivan
8c8fa79312
Add block and closure protos and parse/pp block and lambda exprs.
2011-07-26 12:30:14 -07:00
Marijn Haverbeke
2c1250780d
Remove tuple support from the compiler
2011-07-26 15:19:56 +02:00
Marijn Haverbeke
e123366bff
Make the pretty-printer output new-style syntax for records
2011-07-26 10:53:24 +02:00
Marijn Haverbeke
ce808bbc6f
Make the pretty-printer output new-style syntax for local decls
2011-07-26 10:40:28 +02:00
Michael Sullivan
25a89e068d
Rename the block type to be blk also. Sorry.
2011-07-25 14:18:07 -07:00
Graydon Hoare
552bff8a21
Adjust pp interface to that printing a crate (an reproducing literals/comments) takes a reader, not just a filename. Fixes first big pp-fuzzer bug.
2011-07-25 14:04:49 -07:00
Michael Sullivan
6bcdb48e35
Disallow block as a variable name in preparation for it becoming a keyword.
2011-07-25 13:42:38 -07:00
Marijn Haverbeke
b9b674abe7
Start adding support for multiple variable declarations per stmt
...
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-22 17:51:26 +02:00
Lindsey Kuper
55acc737a8
Remove vestiges of typarams from anon objs.
2011-07-21 15:12:27 -07:00
Marijn Haverbeke
c32f525f73
Make the pretty-printer output paren-free and case-free code
...
We should probably do another pretty-printing pass soon.
2011-07-21 15:37:14 +02:00
Tim Chevalier
bd4aeef78b
Beginnings of support for constrained types
...
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-19 18:57:28 -07:00
Michael Sullivan
da2a7e5bd2
Simple refactoring in the pretty printer.
...
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-19 18:30:08 -07:00
Josh Matthews
a411c865b2
Make clear the differentiation between char pos and byte pos in filemaps. Fix up error printing for files with multi-byte characters.
2011-07-16 15:57:24 -07:00
Patrick Walton
917afa4cc9
rustc: Remove a bunch of exterior vectors
2011-07-15 11:38:46 -07:00
Patrick Walton
be489ee9e2
rustc: Move much of metadata reading over to interior vectors
2011-07-14 12:00:48 -07:00