Commit graph

3340 commits

Author SHA1 Message Date
Brian Anderson
ecf1bd7651 rustc: Use spans on extfmt error messages
Issue #444
2011-06-04 17:10:04 -04:00
Brian Anderson
794221b353 rustc: Return the correct span from parse_seq 2011-06-04 16:36:08 -04:00
Brian Anderson
c18f2e2dac rustc: Pass the correct span to syntax extensions 2011-06-04 15:57:13 -04:00
Brian Anderson
af46f3ed0d rustc: Introduce ext module. Move some things from parser to ext.
Introduce an ext_ctxt record to provide a span_err method for use while
expanding syntax extensions. Hopefully it will be useful for other things.
2011-06-04 15:49:42 -04:00
Paul Stansifer
dbd066a02a "macro" -> "syntax extension" for now 2011-06-03 18:47:11 -07:00
Paul Stansifer
79fcd51b46 Make the macro system more modular. 2011-06-03 18:47:11 -07:00
Graydon Hoare
cfc75695a5 Register new snapshots. 2011-06-03 18:47:08 -07:00
Graydon Hoare
f29d04672b Remove zerobreak between foo and ( on a call expr. Never looks right. 2011-06-03 17:32:29 -07:00
Graydon Hoare
f34d19a242 Make pp more conservative about inserting trailing comments mid-list. 2011-06-03 17:32:29 -07:00
Lindsey Kuper
69325f815d More comments. 2011-06-03 17:16:28 -07:00
Lindsey Kuper
dcf7fbf833 Comments and cleanup. 2011-06-03 17:09:50 -07:00
Patrick Walton
cb4c969ba6 rustc: Add a "smallintmap" implementation 2011-06-03 16:15:14 -07:00
Graydon Hoare
088ab03fdb Add spans to fields, args, methods. Improve pp of same. 2011-06-03 15:42:42 -07:00
Graydon Hoare
8235e76a47 Tidy up printing of ty_fn. 2011-06-03 15:42:42 -07:00
Rafael Ávila de Espíndola
429e21414b Parse pointers in metadata. 2011-06-03 15:13:10 -04:00
Rafael Ávila de Espíndola
ba74c6cfdc Boilerplate for pointers. Sorry for missing this on the first patch. 2011-06-03 15:02:58 -04:00
Rafael Ávila de Espíndola
18b63865ce Accept *foo as a pointer to foo.
This is accepted everywhere, since just passing a pointer is safe.
2011-06-03 14:34:19 -04:00
Marijn Haverbeke
07667d29aa Temporarily xfail compile-fail/pattern-tyvar
So that the tinderboxes can go green again. Patrick, please look into
this at some point.
2011-06-03 10:23:13 +02:00
Lindsey Kuper
dc29dead2e Removing redundant "fail"s. 2011-06-02 18:15:29 -07:00
Patrick Walton
ad9afefa10 rustc: Typecheck patterns from the top down; remove pushdown_pat 2011-06-02 18:11:26 -07:00
Tim Chevalier
76bcbfd269 Un-XFAIL break-value
It passes thanks to the previous two commits.
2011-06-02 17:52:04 -07:00
Tim Chevalier
ba377c043d Handle _|_ values properly in trans
Generate an LLVMUndef value of the proper type for an argument of
type _|_. Otherwise we get an LLVM assertion failure.
2011-06-02 17:52:04 -07:00
Tim Chevalier
468786e36d Fix unification bug
Hello from SFO Terminal 3!

unify_fn_common had the expected and actual types reversed in one
place. This was causing the type of an occurence of a function f
with type fn(int) -> T to be set to fn(_|_) -> T at a call site like
f(fail); I think this was also making some of the type error messages
come out backwards, but I haven't checked.

Also: ty_bot does not contain pointers
2011-06-02 17:52:04 -07:00
Patrick Walton
c515ed13de Merge pull request #450 from paulstansifer/quick_error_message_fix_2
Flatten functions and objects in trans::simplify_type.
2011-06-02 17:43:11 -07:00
Paul Stansifer
20bd927c3f Flatten functions and objects in trans::simplify_type. 2011-06-02 17:40:12 -07:00
Graydon Hoare
cb61d7b38e Pretty-print literals exactly as we saw them in the source. 2011-06-02 17:18:49 -07:00
Lindsey Kuper
3a6b5576ac Refactor make_fp_cmp_glue and make_integral_cmp_glue into one. 2011-06-02 16:35:25 -07:00
Paul Stansifer
1377e9b341 Implement pcwalton's code review suggestions. 2011-06-02 15:12:17 -07:00
Paul Stansifer
5cd10d2fef Error message, instead of segfault, when recursive types are used. 2011-06-02 14:03:17 -07:00
Patrick Walton
12f86e6f2f rustc: Print node IDs for more types of nodes 2011-06-02 11:29:17 -07:00
Patrick Walton
7c6a0f189e rustc: Tiny style fix in pprust::rust_printer 2011-06-02 11:29:17 -07:00
Graydon Hoare
f919af0f8f Remove offending hyphen. 2011-06-02 10:34:19 -07:00
Marijn Haverbeke
fd5428a95e Re-xfail lib-io test. Seems to only work on Linux 2011-06-02 17:58:49 +02:00
Marijn Haverbeke
5144f790fe Fix and un-xfail vec-append test 2011-06-02 16:45:26 +02:00
Marijn Haverbeke
75ffe657db Un-xfail multi test 2011-06-02 16:21:14 +02:00
Marijn Haverbeke
8ac94d59e8 Un-xfail lib-io test 2011-06-02 16:19:30 +02:00
Marijn Haverbeke
830c58b651 Un-xfail obj-dtor-2 2011-06-02 16:12:20 +02:00
Patrick Walton
78374d11ce rustc: Add a new mode to the pretty printer that prints out node IDs, for debugging 2011-06-01 18:53:52 -07:00
Patrick Walton
eae3036179 rustc: Remove else-after-return in main 2011-06-01 18:38:00 -07:00
Patrick Walton
d43f60e5d4 rustc: Fold --pretty and --typed-pretty into a single option with an optional argument 2011-06-01 18:32:05 -07:00
Patrick Walton
8c3809afd0 stdlib: Add some functions to getopts to deal with optional arguments more easily 2011-06-01 18:32:05 -07:00
Tim Chevalier
24c9d7e5f8 Improve type error message for non-constructor in pattern 2011-06-01 18:15:12 -07:00
Tim Chevalier
1402cd101b Redo typestate-related data structures to support predicate constraints. No actual support yet, just infrastructure. 2011-06-01 18:14:48 -07:00
Tim Chevalier
af4554aadf Add a few more to_str functions 2011-06-01 17:47:59 -07:00
Tim Chevalier
ac4ef1741e Allow constraint args to be literals 2011-06-01 17:45:13 -07:00
Lindsey Kuper
528c6516f0 Use span_err instead of err. Fixes issue #444. 2011-06-01 17:22:23 -07:00
Graydon Hoare
d569a71b0b make 'reformat' do libstd as well. 2011-06-01 16:57:17 -07:00
Patrick Walton
af9272f70e rustc: Remove rustboot workaround from walk::default_visitor() 2011-06-01 16:52:22 -07:00
Patrick Walton
8851ae0423 rustc: Allow walking over patterns 2011-06-01 16:47:24 -07:00
Graydon Hoare
6e058ff54e Register new snapshots. 2011-06-01 16:39:31 -07:00