about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2015-10-13Merge VariantData and VariantData_Vadim Petrochenkov-22/+14
2015-10-13Merge struct fields and struct kindVadim Petrochenkov-22/+15
2015-10-13Dict -> Struct, StructDef -> VariantData, def -> dataVadim Petrochenkov-11/+11
2015-10-13Test and gate empty structures and variants betterVadim Petrochenkov-8/+1
2015-10-13Remove now redundant NodeId from VariantVadim Petrochenkov-1/+0
2015-10-13Decouple structure kinds from NodeIdsVadim Petrochenkov-12/+17
2015-10-13Unify structures and enum variants in ASTVadim Petrochenkov-19/+16
2015-10-10Prevent `/**/` from being parsed as a doc commentBarosl Lee-2/+3
Previously, `/**/` was incorrectly regarded as a doc comment because it starts with `/**` and ends with `*/`. However, this caused an ICE because some code assumed that the length of a doc comment is at least 5. This commit adds an additional check to `is_block_doc_comment` that tests the length of the input. Fixes #28844.
2015-10-09Some cleanup of no longer used AST thingsNick Cameron-2/+2
2015-10-03Implement original version of RFC#1245John Hodge-3/+8
2015-10-01Stop re-exporting AttrStyle's variants and rename them.Ms2ger-8/+8
2015-09-26Auto merge of #28642 - petrochenkov:name3, r=nrcbors-19/+18
This PR removes random remaining `Ident`s outside of libsyntax and performs general cleanup In particular, interfaces of `Name` and `Ident` are tidied up, `Name`s and `Ident`s being small `Copy` aggregates are always passed to functions by value, and `Ident`s are never used as keys in maps, because `Ident` comparisons are tricky. Although this PR closes https://github.com/rust-lang/rust/issues/6993 there's still work related to it: - `Name` can be made `NonZero` to compress numerous `Option<Name>`s and `Option<Ident>`s but it requires const unsafe functions. - Implementation of `PartialEq` on `Ident` should be eliminated and replaced with explicit hygienic, non-hygienic or member-wise comparisons. - Finally, large parts of AST can potentially be converted to `Name`s in the same way as HIR to clearly separate identifiers used in hygienic and non-hygienic contexts. r? @nrc
2015-09-24Cleanup interfaces of Name, SyntaxContext and IdentVadim Petrochenkov-19/+18
Make sure Name, SyntaxContext and Ident are passed by value Make sure Idents don't serve as keys (or parts of keys) in maps, Ident comparison is not well defined
2015-09-24Remove the deprecated box(PLACE) syntax.Eduard Burtescu-68/+11
2015-09-21Auto merge of #28552 - apasel422:issue-28527, r=Manishearthbors-14/+10
Closes #28527. r? @Manishearth
2015-09-20Auto merge of #28534 - marcusklaas:fix-mod-inner-span, r=alexcrichtonbors-1/+1
Fixes https://github.com/rust-lang/rust/issues/28520. r? @alexcrichton or @nrc?
2015-09-20Replace `ast::Mac_` enum with structAndrew Paseltiner-14/+10
Closes #28527.
2015-09-20Fix the overly long inner spans of inline modsMarcus Klaas-1/+1
2015-09-20Auto merge of #28503 - marcusklaas:pub-extern, r=alexcrichtonbors-7/+4
Fixes https://github.com/rust-lang/rust/issues/28472.
2015-09-19Auto merge of #28486 - nrc:pub-extern-crate, r=alexcrichtonbors-5/+12
Temporary 'fix' for #26775 r? @brson
2015-09-19Include visibility modifier in span of foreign itemMarcus Klaas-7/+4
2015-09-18Auto merge of #28442 - nagisa:remove-enum-vis-field, r=alexcrichtonbors-5/+1
Followup on #28440 Do not merge before the referenced PR is merged. I will fix the PR once that is merged (or close if it is not)
2015-09-18Implement empty struct with braces (RFC 218)Vadim Petrochenkov-18/+3
2015-09-18Warn on `pub extern crate`.Nick Cameron-5/+12
Temporary 'fix' for #26775
2015-09-17Remove Visibility field from enum variantsSimonas Kazlauskas-1/+0
Followup on #28440
2015-09-17libsyntax: forbid visibility modifiers for enum variantsAleksey Kladov-5/+2
fixes #28433
2015-09-17Fix the span for ! returnsNick Cameron-1/+1
2015-09-14Auto merge of #28247 - christopherdumas:fix_28243, r=eddybbors-1/+1
as per #28243.
2015-09-14Fix tuple float bug.christopherdumas-1/+1
2015-09-13Auto merge of #28286 - matklad:remove-dead-code, r=eddybbors-38/+31
There is a dead code in libsyntax/parser/parse.rs, when parsing structs. Two functions are involved: * [parse_item_struct](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4691) * [parse_tuple_struct_body](https://github.com/rust-lang/rust/blob/cd9c9f048f6aa0be091cd9835771ba0712bead4e/src/libsyntax/parse/parser.rs#L4769) The problem is that both functions handle the case with unit structs. But because `parse_tuple_struct_body` is called from `parse_item_struct`, it never faces this case. This PR removes unit struct case from `parse_tuple_struct_body` function. I tested with `make -j8 check-statge1`.
2015-09-11Remove some remains of virtual structs from the parserVadim Petrochenkov-16/+6
2015-09-10libsyntax: minor clean upAleksey Kladov-4/+4
Escape `{` in format strings as `{{`, instead of using a substitution
2015-09-08Fix span bug with >> and type bindingsNick Cameron-1/+1
2015-09-07libsyntax: restore lost error messageAleksey Kladov-1/+5
2015-09-07libsyntax: remove dead code from parser.rsAleksey Kladov-35/+24
Both `parse_tuple_struct_body` and `parse_item_struct` handled the case of unit like struct. The redundancy is removed, `parse_tuple_struct_body` now handles only real tuple structs.
2015-09-06functional structure update syntax -> structure update syntaxchristopherdumas-2/+1
2015-09-04Auto merge of #28034 - alexcrichton:new-lines, r=aturonbors-1/+1
This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of the `str::lines` and `BufRead::lines` iterators. Both iterators now account for `\r\n` sequences in addition to `\n`, allowing for less surprising behavior across platforms (especially in the `BufRead` case). Splitting *only* on the `\n` character can still be achieved with `split('\n')` in both cases. The `str::lines_any` function is also now deprecated as `str::lines` is a drop-in replacement for it. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md Closes #28032
2015-09-03std: Account for CRLF in {str, BufRead}::linesAlex Crichton-1/+1
This commit is an implementation of [RFC 1212][rfc] which tweaks the behavior of the `str::lines` and `BufRead::lines` iterators. Both iterators now account for `\r\n` sequences in addition to `\n`, allowing for less surprising behavior across platforms (especially in the `BufRead` case). Splitting *only* on the `\n` character can still be achieved with `split('\n')` in both cases. The `str::lines_any` function is also now deprecated as `str::lines` is a drop-in replacement for it. [rfc]: https://github.com/rust-lang/rfcs/blob/master/text/1212-line-endings.md Closes #28032
2015-09-04Auto merge of #28170 - nagisa:loopctl-label-spans, r=alexcrichtonbors-6/+9
r? @alexcrichton
2015-09-03Use consistent terminology for byte string literalsVadim Petrochenkov-16/+16
Avoid confusion with binary integer literals and binary operator expressions in libsyntax
2015-09-03Use proper span for break and continue labelsSimonas Kazlauskas-6/+9
Fixes #28109
2015-09-02Fix overly long spans for break and continueMarcus Klaas-2/+2
The spans of break and continue would include the next token.
2015-08-30Assign correct span to continue expressionMarcus Klaas-1/+0
Fixes https://github.com/rust-lang/rust/issues/28105.
2015-08-11syntax: fix use of "vector" for [x; n] literal and [x, y] patternsGeorg Brandl-2/+2
2015-08-10Auto merge of #27451 - seanmonstar:use-groups-as, r=alexcrichtonbors-6/+14
An implementation of [RFC 1219](https://github.com/rust-lang/rfcs/pull/1219). The RFC is not merged yet, but once merged, this could be.
2015-08-08rustc: rename multiple imports in a listSean McArthur-6/+14
2015-08-04Make parser recognize macro invocations in typesJared Roesch-2/+15
Reapplied the changes from https://github.com/freebroccolo/rust/commit/8b07abaa6e8ab42d37656dfad89de0eb5810c3b3 to a clean branch of master
2015-08-01Auto merge of #27447 - eefriedman:parser-cleanup, r=alexcrichtonbors-31/+0
2015-07-31Fix `impl A .. {}`Seo Sanghyeon-1/+1
2015-07-30Remove unused code in parser.Eli Friedman-31/+0