Commit Graph

24 Commits

Author SHA1 Message Date
mr.Shu ee3fa68fed Fixed error starting with uppercase
Error messages cleaned in librustc/middle

Error messages cleaned in libsyntax

Error messages cleaned in libsyntax more agressively

Error messages cleaned in librustc more aggressively

Fixed affected tests

Fixed other failing tests

Last failing tests fixed
2014-02-08 20:59:38 +01:00
Patrick Walton 8e52b85d5a libsyntax: De-@str literal strings in the AST 2014-02-02 01:44:48 +11:00
Huon Wilson 4be3262058 syntax::ext: replace span_fatal with span_err in many places.
This means that compilation continues for longer, and so we can see more
errors per compile. This is mildly more user-friendly because it stops
users having to run rustc n times to see n macro errors: just run it
once to see all of them.
2014-01-18 02:03:04 +11:00
Eduard Burtescu 6b221768cf libsyntax: Renamed types, traits and enum variants to CamelCase. 2014-01-09 22:25:28 +02:00
Steven Fackler 8143662836 Start passing around &mut ExtCtxt 2013-12-29 23:41:09 -08:00
Steven Fackler 0607c138ca Stop using @ExtCtxt 2013-12-28 21:16:03 -07:00
Marvin Löbel 24b316a3b9 Removed unneccessary _iter suffixes from various APIs 2013-11-26 10:02:26 +01:00
Benjamin Herr 9d7b130041 add new enum ast::StrStyle as field to ast::lit_str
For the benefit of the pretty printer we want to keep track of how
string literals in the ast were originally represented in the source
code.

This commit changes parser functions so they don't extract strings from
the token stream without at least also returning what style of string
literal it was. This is stored in the resulting ast node for string
literals, obviously, for the package id in `extern mod = r"package id"`
view items, for the inline asm in `asm!()` invocations.

For `asm!()`'s other arguments or for `extern "Rust" fn()` items, I just
the style of string, because it seemed disproportionally cumbersome to
thread that information through the string processing that happens with
those string literals, given the limited advantage raw string literals
would provide in these positions.

The other syntax extensions don't seem to store passed string literals
in the ast, so they also discard the style of strings they parse.
2013-10-08 03:43:28 +02:00
Kevin Ballard b0647feab0 Limit spans in bytes!() error messages to the argument in question
This constrains the span to the appropriate argument, so you know which
one caused the problem. Instead of

  foo.rs:2:4: 2:21 error: Too large integer literal in bytes!
  foo.rs:2    bytes!(1, 256, 2)
              ^~~~~~~~~~~~~~~~~

it will say

  foo.rs:2:14 2:17 error: Too large integer literal in bytes!
  foo.rs:2    bytes!(1, 256, 2)
                        ^~~
2013-09-16 18:55:56 -07:00
Daniel Micay 62a3434529 stop treating char as an integer type
Closes #7609
2013-09-04 08:07:56 -04:00
Marvin Löbel 7419085337 Modernized a few more types in syntax::ast 2013-09-03 14:45:06 +02:00
Marvin Löbel 539f37925c Modernized a few type names in rustc and syntax 2013-09-01 14:43:26 +02:00
Daniel Micay 1008945528 remove obsolete foreach keyword
this has been replaced by `for`
2013-08-03 22:48:02 -04:00
Daniel Micay 1fc4db2d08 migrate many for loops to foreach 2013-08-01 05:34:55 -04:00
Marvin Löbel e33fca9ffe Added str::char_offset_iter() and str::rev_char_offset_iter()
Renamed bytes_iter to byte_iter to match other iterators
Refactored str Iterators to use DoubleEnded Iterators and typedefs instead of wrapper structs
Reordered the Iterator section
Whitespace fixup
Moved clunky `each_split_within` function to the one place in the tree where it's actually needed
Replaced all block doccomments in str with line doccomments
2013-07-30 12:55:48 +02:00
Birunthan Mohanathas 5afb3d20aa Disallow non-comma-delimited arguments to fmt! and bytes!
Closes #4982.
2013-07-24 09:45:20 -04:00
Daniel Micay d2e9912aea vec: remove BaseIter implementation
I removed the `static-method-test.rs` test because it was heavily based
on `BaseIter` and there are plenty of other more complex uses of static
methods anyway.
2013-06-23 02:05:20 -04:00
Daniel Micay 585f5f7f79 add IteratorUtil to the prelude 2013-06-14 23:15:42 -04:00
Huon Wilson 00f5916809 std: replace the str::each* fns/methods with byte iterators 2013-06-09 02:22:23 +10:00
Huon Wilson a59bec43e3 syntax/ext: convert all AstBuilder methods to a uniform syntax. 2013-05-22 00:30:52 +10:00
Huon Wilson 6e50515530 syntax/ext: migrate build.rs functions to AstBuilder methods. 2013-05-22 00:15:36 +10:00
Huon Wilson 4045da9f4f syntax/ext: modernise ext_ctxt to be CamelCase and use new. 2013-05-22 00:04:10 +10:00
Marvin Löbel 7a2afb7288 Made bytes!() accept a list of string, integer or char literals 2013-05-18 00:26:04 +02:00
Sangeun Kim 70a19d5f63 Implement bytes! syntax extension 2013-05-16 13:29:54 +09:00