about summary refs log tree commit diff
path: root/src/libsyntax/parse/attr.rs
AgeCommit message (Collapse)AuthorLines
2015-01-07use slicing sugarJorge Aparicio-1/+1
2015-01-06rollup merge of #20481: seanmonstar/fmt-show-stringAlex Crichton-2/+2
Conflicts: src/compiletest/runtest.rs src/libcore/fmt/mod.rs src/libfmt_macros/lib.rs src/libregex/parse.rs src/librustc/middle/cfg/construct.rs src/librustc/middle/dataflow.rs src/librustc/middle/infer/higher_ranked/mod.rs src/librustc/middle/ty.rs src/librustc_back/archive.rs src/librustc_borrowck/borrowck/fragments.rs src/librustc_borrowck/borrowck/gather_loans/mod.rs src/librustc_resolve/lib.rs src/librustc_trans/back/link.rs src/librustc_trans/save/mod.rs src/librustc_trans/trans/base.rs src/librustc_trans/trans/callee.rs src/librustc_trans/trans/common.rs src/librustc_trans/trans/consts.rs src/librustc_trans/trans/controlflow.rs src/librustc_trans/trans/debuginfo.rs src/librustc_trans/trans/expr.rs src/librustc_trans/trans/monomorphize.rs src/librustc_typeck/astconv.rs src/librustc_typeck/check/method/mod.rs src/librustc_typeck/check/mod.rs src/librustc_typeck/check/regionck.rs src/librustc_typeck/collect.rs src/libsyntax/ext/format.rs src/libsyntax/ext/source_util.rs src/libsyntax/ext/tt/transcribe.rs src/libsyntax/parse/mod.rs src/libsyntax/parse/token.rs src/test/run-pass/issue-8898.rs
2015-01-06core: split into fmt::Show and fmt::StringSean McArthur-2/+2
fmt::Show is for debugging, and can and should be implemented for all public types. This trait is used with `{:?}` syntax. There still exists #[derive(Show)]. fmt::String is for types that faithfully be represented as a String. Because of this, there is no way to derive fmt::String, all implementations must be purposeful. It is used by the default format syntax, `{}`. This will break most instances of `{}`, since that now requires the type to impl fmt::String. In most cases, replacing `{}` with `{:?}` is the correct fix. Types that were being printed specifically for users should receive a fmt::String implementation to fix this. Part of #20013 [breaking-change]
2015-01-07Replace full slice notation with index callsNick Cameron-1/+1
2014-12-21Fallout of std::str stabilizationAlex Crichton-2/+1
2014-12-05rollup merge of #19413: P1start/more-trailing-commasCorey Richardson-1/+1
The only other place I know of that doesn’t allow trailing commas is closure types (#19414), and those are a bit tricky to fix (I suspect it might be impossible without infinite lookahead) so I didn’t implement that in this patch. There are other issues surrounding closure type parsing anyway, in particular #19410.
2014-11-30Allow trailing commas in array patterns and attributesP1start-1/+1
2014-11-30Adjust some error messages to start with a lowercase letter and not finish ↵P1start-1/+1
with a full stop
2014-11-11syntax: improve message for misused inner attributesLiigo Zhuang-0/+2
2014-10-30Use common variants for open and close delimitersBrendan Zabarauskas-6/+6
This common representation for delimeters should make pattern matching easier. Having a separate `token::DelimToken` enum also allows us to enforce the invariant that the opening and closing delimiters must be the same in `ast::TtDelimited`, removing the need to ensure matched delimiters when working with token trees.
2014-10-28Use PascalCase for token variantsBrendan Zabarauskas-17/+16
2014-10-16libsyntax: Remove all uses of {:?}.Luqman Aden-1/+1
2014-09-14syntax: fix fallout from using ptr::P.Eduard Burtescu-15/+21
2014-08-24Adjust the error messages to match the pattern "expected foo, found bar"Jonas Hietala-1/+1
Closes #8492
2014-07-11Fix spans for attributesSteven Fackler-1/+1
They used to be one token too long, so you'd see things like ``` rust/rust/test.rs:1:1: 2:2 warning: unused attribute, rust/rust/test.rs:1 #![foo] rust/rust/test.rs:2 #![bar] ``` instead of ``` test.rs:1:1: 1:8 warning: unused attribute, #[warn(unused_attribute)] on by default test.rs:1 #![foo] ^~~~~~~ ```
2014-07-09ast: make Name its own typeCorey Richardson-2/+2
2014-07-09lexer: lex WS/COMMENT/SHEBANG rather than skippingCorey Richardson-1/+1
Now, the lexer will categorize every byte in its input according to the grammar. The parser skips over these while parsing, thus avoiding their presence in the input to syntax extensions.
2014-07-09syntax: doc comments all the thingsCorey Richardson-21/+21
2014-07-08std: Rename the `ToStr` trait to `ToString`, and `to_str` to `to_string`.Richo Healey-1/+1
[breaking-change]
2014-06-15Register new snapshotsAlex Crichton-7/+0
2014-06-14rustc: Obsolete the `@` syntax entirelyAlex Crichton-1/+1
This removes all remnants of `@` pointers from rustc. Additionally, this removes the `GC` structure from the prelude as it seems odd exporting an experimental type in the prelude by default. Closes #14193 [breaking-change]
2014-06-13Fix all violations of stronger guarantees for mutable borrowsCameron Zwarich-1/+2
Fix all violations in the Rust source tree of the stronger guarantee of a unique access path for mutable borrows as described in #12624.
2014-06-11std: Remove i18n/l10n from format!Alex Crichton-0/+7
* The select/plural methods from format strings are removed * The # character no longer needs to be escaped * The \-based escapes have been removed * '{{' is now an escape for '{' * '}}' is now an escape for '}' Closes #14810 [breaking-change]
2014-06-11syntax: Move the AST from @T to Gc<T>Alex Crichton-11/+13
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-05-24Changes from feedbackSteven Fackler-4/+4
2014-05-24Add AttrId to Attribute_Steven Fackler-1/+7
2014-05-22auto merge of #14357 : huonw/rust/spelling, r=pnkfelixbors-4/+4
The span on a inner doc-comment would point to the next token, e.g. the span for the `a` line points to the `b` line, and the span of `b` points to the `fn`. ```rust //! a //! b fn bar() {} ```
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-1/+1
2014-05-22syntax: put the correct span on doc-comments inside a module.Huon Wilson-4/+4
The position of the .bump call (before extracting the span fields) was causing a doc-comment to have the span of the next token, not itself.
2014-05-03Remove comment about semicolons for inner attributes from docs and adjust ↵Kevin Butler-1/+2
comments.
2014-03-28Convert most code to new inner attribute syntax.Brian Anderson-3/+2
Closes #2569
2014-03-28syntax: Accept meta matchers in macrosAlex Crichton-11/+8
This removes the `attr` matcher and adds a `meta` matcher. The previous `attr` matcher is now ambiguous because it doesn't disambiguate whether it means inner attribute or outer attribute. The new behavior can still be achieved by taking an argument of the form `#[$foo:meta]` (the brackets are part of the macro pattern). Closes #13067
2014-03-20syntax: Tidy up parsing the new attribute syntaxAlex Crichton-28/+18
2014-03-20Added new attribute syntax with backward compatibility.Daniel Fagnan-9/+27
Signed-off-by: Daniel Fagnan <dnfagnan@gmail.com>
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-2/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-17De-@ ParseSess uses.Eduard Burtescu-1/+1
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-0/+2
2014-03-01libsyntax: Mechanically change `~[T]` to `Vec<T>`Patrick Walton-12/+12
2014-02-02libsyntax: De-`@str` literal strings in the ASTPatrick Walton-2/+2
2014-02-02libsyntax: Introduce an `InternedString` type to reduce `@str` in thePatrick Walton-1/+1
compiler and use it for attributes
2014-01-09libsyntax: Renamed types, traits and enum variants to CamelCase.Eduard Burtescu-6/+6
2014-01-02libsyntax: De-`@mut` `token` in the parserPatrick Walton-6/+6
2014-01-02libsyntax: Make the parser mutablePatrick Walton-16/+17
2013-11-28Register new snapshotsAlex Crichton-3/+3
2013-10-30syntax: Forbid non-string literals in meta items. #623Brian Anderson-0/+10
2013-10-22Drop the '2' suffix from logging macrosAlex Crichton-2/+2
Who doesn't like a massive renaming?
2013-09-30syntax: Remove usage of fmt!Alex Crichton-4/+4
2013-09-01Modernized a few type names in rustc and syntaxMarvin Löbel-2/+2