summary refs log tree commit diff
path: root/src/libsyntax/ext/tt/transcribe.rs
AgeCommit message (Collapse)AuthorLines
2015-04-05Work towards a non-panicing parser (libsyntax)Phil Dawes-7/+7
- Functions in parser.rs return PResult<> rather than panicing - Other functions in libsyntax call panic! explicitly for now if they rely on panicing behaviour. - 'panictry!' macro added as scaffolding while converting panicing functions. (This does the same as 'unwrap()' but is easier to grep for and turn into try!()) - Leaves panicing wrappers for the following functions so that the quote_* macros behave the same: - parse_expr, parse_item, parse_pat, parse_arm, parse_ty, parse_stmt
2015-02-18Round 3 test fixes and conflictsAlex Crichton-1/+1
2015-02-18Replace all uses of `&foo[]` with `&foo[..]` en masse.Niko Matsakis-1/+1
2015-02-02Omit integer suffix when unnecessaryAlfie John-1/+1
See PR # 21378 for context
2015-01-18libsyntax: 0u -> 0us, 0i -> 0isPaul Collier-1/+1
2015-01-17libsyntax: uint types to usizePaul Collier-4/+4
2015-01-07use slicing sugarJorge Aparicio-3/+3
2015-01-06rollup merge of #19430: pczarn/interp_tt-cleanupAlex Crichton-11/+23
Conflicts: src/libsyntax/parse/parser.rs
2015-01-07Cleanup and followup to PR #17830: parsing changesPiotr Czarnecki-11/+23
Prevents breaking down `$name` tokens into separate `$` and `name`. Reports unknown macro variables. Fixes #18775 Fixes #18839 Fixes #15640
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-2/+2
2015-01-05Add a special macro nonterminal $crateKeegan McAllister-1/+28
2015-01-03sed -i -s 's/#\[deriving(/#\[derive(/g' **/*.rsJorge Aparicio-3/+3
2015-01-03use assoc types in binop traitsJorge Aparicio-1/+3
2014-12-21Fallout of std::str stabilizationAlex Crichton-2/+2
2014-12-19Register new snapshotsAlex Crichton-24/+0
This does not yet start the movement to rustc-serialize. That detail is left to a future PR.
2014-12-13libsyntax: convert `LockstepIterSize` binops to by valueJorge Aparicio-0/+24
2014-11-17Switch to purely namespaced enumsSteven Fackler-0/+1
This breaks code that referred to variant names in the same namespace as their enum. Reexport the variants in the old location or alter code to refer to the new locations: ``` pub enum Foo { A, B } fn main() { let a = A; } ``` => ``` pub use self::Foo::{A, B}; pub enum Foo { A, B } fn main() { let a = A; } ``` or ``` pub enum Foo { A, B } fn main() { let a = Foo::A; } ``` [breaking-change]
2014-11-16fallout from deprecating find_copy and get_copyAlexis Beingessner-1/+1
2014-11-07Add `ast::SequenceRepetition`Piotr Czarnecki-13/+17
2014-11-05Workaround to have doc comments desugared only in macrosPiotr Czarnecki-2/+12
2014-11-05Use `TokenTree`s in lhs of macrosPiotr Czarnecki-64/+73
2014-10-30Use common variants for open and close delimitersBrendan Zabarauskas-8/+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-6/+6
2014-10-26Add a KleeneOp enum for clarityBrendan Zabarauskas-3/+3
2014-10-26Reduce the size of the TokenTreeBrendan Zabarauskas-4/+9
2014-10-26Use standard capitalisation for TokenTree variantsBrendan Zabarauskas-12/+12
2014-10-26Prevent some vector reallocationsBrendan Zabarauskas-6/+6
2014-10-26Rename TokenTree variants for clarityBrendan Zabarauskas-10/+10
This should be clearer, and fits in better with the `TTNonterminal` variant. Renames: - `TTTok` -> `TTToken` - `TTDelim` -> `TTDelimited` - `TTSeq` -> `TTSequence`
2014-10-26Add Span and separate open/close delims to TTDelimBrendan Zabarauskas-22/+32
This came up when working [on the gl-rs generator extension](https://github.com/bjz/gl-rs/blob/990383de801bd2e233159d5be07c9b5622827620/src/gl_generator/lib.rs#L135-L146). The new definition of `TTDelim` adds an associated `Span` that covers the whole token tree and enforces the invariant that a delimited sequence of token trees must have an opening and closing delimiter. A `get_span` method has also been added to `TokenTree` type to make it easier to implement better error messages for syntax extensions.
2014-10-19Remove a large amount of deprecated functionalityAlex Crichton-2/+2
Spring cleaning is here! In the Fall! This commit removes quite a large amount of deprecated functionality from the standard libraries. I tried to ensure that only old deprecated functionality was removed. This is removing lots and lots of deprecated features, so this is a breaking change. Please consult the deprecation messages of the deleted code to see how to migrate code forward if it still needs migration. [breaking-change]
2014-09-16Fallout from renamingAaron Turon-6/+6
2014-07-09syntax: doc comments all the thingsCorey Richardson-6/+6
2014-06-10Fix more misspelled comments and strings.Joseph Crail-1/+1
2014-06-05Fallout from the libcollections movementAlex Crichton-1/+1
2014-05-27std: Rename strbuf operations to stringRicho Healey-1/+1
[breaking-change]
2014-05-24core: rename strbuf::StrBuf to string::StringRicho Healey-1/+1
[breaking-change]
2014-05-22libstd: Remove `~str` from all `libstd` modules except `fmt` and `str`.Patrick Walton-4/+5
2014-05-08libsyntax: Remove uses of `~str` from libsyntax, and fix falloutPatrick Walton-3/+3
2014-05-06librustc: Remove `~EXPR`, `~TYPE`, and `~PAT` from the language, exceptPatrick Walton-1/+1
for `~str`/`~[]`. Note that `~self` still remains, since I forgot to add support for `Box<self>` before the snapshot. How to update your code: * Instead of `~EXPR`, you should write `box EXPR`. * Instead of `~TYPE`, you should write `Box<Type>`. * Instead of `~PATTERN`, you should write `box PATTERN`. [breaking-change]
2014-03-31syntax: Switch field privacy as necessaryAlex Crichton-7/+7
2014-03-28De-@ NamedMatch.Eduard Burtescu-6/+6
2014-03-28De-@ TokenTree.Eduard Burtescu-3/+4
2014-03-28Used inherited mutability in lexer::Reader.Eduard Burtescu-173/+141
2014-03-22syntax: Fix fallout of removing get()Alex Crichton-36/+19
2014-03-20Removing imports of std::vec_ng::VecAlex Crichton-1/+0
It's now in the prelude.
2014-03-20rename std::vec_ng -> std::vecDaniel Micay-1/+1
Closes #12771
2014-03-17De-@ codemap and diagnostic.Eduard Burtescu-8/+8
2014-03-01libsyntax: Fix errors arising from the automated `~[T]` conversionPatrick Walton-3/+5