about summary refs log tree commit diff
path: root/src/libsyntax/parse/mod.rs
AgeCommit message (Collapse)AuthorLines
2017-02-03Bump version, upgrade bootstrapAlex Crichton-2/+0
This commit updates the version number to 1.17.0 as we're not on that version of the nightly compiler, and at the same time this updates src/stage0.txt to bootstrap from freshly minted beta compiler and beta Cargo.
2017-01-23Remove `open_span` and `close_span` from `Delimited`.Jeffrey Seyfried-4/+0
2017-01-22Refactor `TokenStream`.Jeffrey Seyfried-1/+1
2017-01-20Rollup merge of #39118 - jseyfried:token_tree_based_parser, r=nrcAlex Crichton-10/+6
Refactor the parser to consume token trees This is groundwork for efficiently parsing attribute proc macro invocations, bang macro invocations, and `TokenStream`-based attributes and fragment matchers. This improves parsing performance by 8-15% and expansion performance by 0-5% on a sampling of the compiler's crates. r? @nrc
2017-01-17Refactor the parser to consume token trees.Jeffrey Seyfried-3/+2
2017-01-17Introduce `string_reader.parse_all_token_trees()`.Jeffrey Seyfried-7/+4
2017-01-17Give the `StringReader` a `sess: &ParseSess`.Jeffrey Seyfried-1/+1
2017-01-17Use resizable Vec instead of P<[T]> in ASTVadim Petrochenkov-1/+1
2016-12-30Such large. Very 128. Much bits.Simonas Kazlauskas-2/+6
This commit introduces 128-bit integers. Stage 2 builds and produces a working compiler which understands and supports 128-bit integers throughout. The general strategy used is to have rustc_i128 module which provides aliases for iu128, equal to iu64 in stage9 and iu128 later. Since nowhere in rustc we rely on large numbers being supported, this strategy is good enough to get past the first bootstrap stages to end up with a fully working 128-bit capable compiler. In order for this strategy to work, number of locations had to be changed to use associated max_value/min_value instead of MAX/MIN constants as well as the min_value (or was it max_value?) had to be changed to use xor instead of shift so both 64-bit and 128-bit based consteval works (former not necessarily producing the right results in stage1). This commit includes manual merge conflict resolution changes from a rebase by @est31.
2016-12-22Refactor how global paths are represented (for both ast and hir).Jeffrey Seyfried-7/+3
2016-12-19Optimize `ast::PathSegment`.Jeffrey Seyfried-44/+9
2016-12-17Auto merge of #38205 - jseyfried:fix_module_directory_regression, r=eddybbors-2/+2
macros: fix the expected paths for a non-inline module matched by an `item` fragment Fixes #38190. r? @nrc
2016-12-07macros: fix the expected paths for a non-inline module matched by an `item` ↵Jeffrey Seyfried-2/+2
fragment.
2016-12-06annotate stricter lifetimes on LateLintPass methods to allow them to forward ↵Oliver Schneider-2/+2
to a Visitor
2016-11-22Start warning cycle.Jeffrey Seyfried-1/+1
2016-11-22Clean up directory ownership semantics.Jeffrey Seyfried-2/+15
2016-11-21Fix fallout in `rustdoc` and tests.Jeffrey Seyfried-28/+23
2016-11-21Use `Symbol` instead of `InternedString` in the AST, HIR, and various other ↵Jeffrey Seyfried-25/+22
places.
2016-11-20Move `syntax::util::interner` -> `syntax::symbol`, cleanup.Jeffrey Seyfried-4/+4
2016-11-20Refactor `P<ast::MetaItem>` -> `ast::MetaItem`.Jeffrey Seyfried-1/+1
2016-11-20Refactor `CrateConfig`.Jeffrey Seyfried-1/+2
2016-10-31Changed most vec! invocations to use square bracesiirelu-16/+16
Most of the Rust community agrees that the vec! macro is clearer when called using square brackets [] instead of regular brackets (). Most of these ocurrences are from before macros allowed using different types of brackets. There is one left unchanged in a pretty-print test, as the pretty printer still wants it to have regular brackets.
2016-10-29Move `CrateConfig` from `Crate` to `ParseSess`.Jeffrey Seyfried-103/+41
2016-10-19Improve `$crate`.Jeffrey Seyfried-1/+1
2016-09-26add unstable_features to ParseSessTim Neumann-0/+3
2016-09-16Overhaul char_lit().Nicholas Nethercote-43/+28
This commit does the following. - Removes parsing support for '\X12', '\u123456' and '\U12345678' char literals. These are no longer valid Rust and rejected by the lexer. (This strange-sounding situation occurs because the parser rescans char literals to compute their value.) - Rearranges the function so that all the escaped values are handled in a single `match`, and changes the error-handling to use vanilla assert!() and unwrap().
2016-09-12Lazily construct panic messages in char_lit().Nicholas Nethercote-5/+7
This reduces the time taken to run `rustc -Zparse-only rustc-benchmarks/issue-32278-big-array-of-strings` from 0.18s to 0.15s on my machine, and reduces the number of instructions (as measured by Cachegrind) from 1.34B to 1.01B. With the change applied, the time to fully compile that benchmark is 1.96s, so this is a 1.5% improvement.
2016-09-12Avoid an unnecessary intermediate value in char_lit().Nicholas Nethercote-14/+9
This makes the function more concise and easier to understand.
2016-08-28Rollup merge of #35917 - jseyfried:remove_attr_ext_traits, r=nrcJeffrey Seyfried-1/+1
syntax: Remove traits `AttrMetaMethods`, `AttributeMethods`, and `AttrNestedMetaItemMethods`
2016-08-28Rollup merge of #35480 - KiChjang:e0379-bonus, r=nikomatsakisJeffrey Seyfried-1/+4
Move E0379 check from typeck to ast validation Part of #35233. Extension of #35338, #35364. Fixes #35404.
2016-08-27Change Constness to Spanned<Constness>Keith Yeung-1/+4
2016-08-25Refactor away `AttrMetaMethods`.Jeffrey Seyfried-1/+1
2016-08-18Add Span field for Generics structsGuillaume Gomez-2/+3
2016-08-07Turn on new errors, json mode. Remove duplicate unicode testJonathan Turner-1/+0
2016-08-01Reimplemented tokenstreams as ropes and reduced the exposed TokenStream API.cgswords-1/+1
2016-07-17Auto merge of #34829 - cgswords:tstream, r=nrcbors-1/+9
Added tokenstream parser procedure A tiny PR that simply adds a procedure for parsing `TokenStream`s to the parser in `src/libsyntax`. This is to ease using `TokenStream`s with the current (old) procedural macro system.
2016-07-15Added tokenstream parser procedurecgswords-1/+9
2016-07-14Remove BasicEmitterJonathan Turner-1/+5
2016-07-04Revert "Change `fold_tt` and `fold_tts` to take token trees by value ↵Jeffrey Seyfried-7/+8
(instead of by reference)" This reverts commit 5bf7970ac70b4e7781e7b2f3816720aa62fac6fd.
2016-06-26Rollup merge of #34436 - jseyfried:no_block_expr, r=eddybJeffrey Seyfried-1/+0
To allow these braced macro invocation, this PR removes the optional expression from `ast::Block` and instead uses a `StmtKind::Expr` at the end of the statement list. Currently, braced macro invocations in blocks can expand into statements (and items) except when they are last in a block, in which case they can only expand into expressions. For example, ```rust macro_rules! make_stmt { () => { let x = 0; } } fn f() { make_stmt! {} //< This is OK... let x = 0; //< ... unless this line is commented out. } ``` Fixes #34418.
2016-06-26Rollup merge of #34339 - jseyfried:thin_vec, r=petrochenkov,ManishearthJeffrey Seyfried-6/+7
Generalize and abstract `ThinAttributes` to `ThinVec<Attribute>`.
2016-06-26Rollup merge of #34316 - jseyfried:refactor_ast_stmt, r=eddybJeffrey Seyfried-6/+6
Refactor away `ast::Decl`, refactor `ast::Stmt`, and rename `ast::ExprKind::Again` to `ast::ExprKind::Continue`.
2016-06-26Rollup merge of #33943 - jseyfried:libsyntax_cleanup, r=nrcJeffrey Seyfried-10/+9
Miscellaneous low priority cleanup in `libsyntax`.
2016-06-26Rollup merge of #34385 - cgswords:tstream, r=nrcJeffrey Seyfried-8/+10
syntax-[breaking-change] cc #31645 (Only breaking because ast::TokenTree is now tokenstream::TokenTree.) This pull request refactors TokenTrees into their own file as src/libsyntax/tokenstream.rs, moving them out of src/libsyntax/ast.rs, in order to prepare for an accompanying TokenStream implementation (per RFC 1566).
2016-06-24Add `ecx.stmt_semi()` and fix issues with the pretty-printerJeffrey Seyfried-1/+0
2016-06-23Address more travis errorsJonathan Turner-1/+2
2016-06-23Move errors from libsyntax to its own crateJonathan Turner-5/+6
2016-06-21Refactored tokentrees into their own files in preparation for tokenstreams. ↵cgswords-8/+10
Modified tests to point to the new file now.
2016-06-19Generalize and abstract `ThinAttributes`Jeffrey Seyfried-6/+7
2016-06-17Fix falloutJeffrey Seyfried-6/+6