about summary refs log tree commit diff
path: root/src/libsyntax/parse
AgeCommit message (Collapse)AuthorLines
2013-09-25rustdoc: Improve comment strippingAlex Crichton-15/+40
There is less implicit removal of various comment styles, and it also removes extraneous stars occasionally found in docblock comments. It turns out that the bug for getops was just a differently formatted block. Closes #9425 Closes #9417
2013-09-25auto merge of #9481 : jbclements/rust/minor-cleanup, r=cmrbors-10/+52
Small stuff... might as well get it into the tree. One new test case, some issue # cleanup, remove some unused imports.
2013-09-25auto merge of #9432 : alexcrichton/rust/correct-item-visibility, r=pcwaltonbors-48/+8
This fixes private statics and functions from being usable cross-crates, along with some bad privacy error messages. This is a reopening of #8365 with all the privacy checks in privacy.rs instead of resolve.rs (where they should be anyway). These maps of exported items will hopefully get used for generating documentation by rustdoc Closes #8592
2013-09-24auto merge of #9335 : alexcrichton/rust/issue-7945, r=thestingerbors-21/+28
As documented in issue #7945, these literal identifiers are all accepted by rust today, but they should probably be disallowed (especially `'''`). This changes all escapable sequences to being *required* to be escaped. Closes #7945 I wanted to write the tests with more exact spans, but I think #9308 will be fixing that?
2013-09-24Disallow char literals which should be escapedAlex Crichton-21/+28
As documented in issue #7945, these literal identifiers are all accepted by rust today, but they should probably be disallowed (especially `'''`). This changes all escapable sequences to being *required* to be escaped. Closes #7945
2013-09-24added test case for tokenization of macro_rulesJohn Clements-0/+45
2013-09-24auto merge of #9336 : alexcrichton/rust/issue-7981, r=catamorphismbors-1/+8
Progress on #7981 This doesn't completely close the issue because `struct A;` is still allowed, and it's a much larger change to disallow that. I'm also not entirely sure that we want to disallow that. Regardless, punting that discussion to the issue instead.
2013-09-24Stop accepting 'impl ...;', require {} insteadAlex Crichton-1/+8
Progress on #7981
2013-09-24cleanupJohn Clements-10/+7
2013-09-24Correctly encode item visibility in metadataAlex Crichton-48/+8
This fixes private statics and functions from being usable cross-crates, along with some bad privacy error messages. This is a reopening of #8365 with all the privacy checks in privacy.rs instead of resolve.rs (where they should be anyway). These maps of exported items will hopefully get used for generating documentation by rustdoc Closes #8592
2013-09-23librustc: Remove the remaining direct uses of `@fn` from librustc.Patrick Walton-1/+1
2013-09-22Reserve the `alignof`, `offsetof`, and `sizeof` keywordsBirunthan Mohanathas-4/+14
Closes #9333.
2013-09-20Implement a web backend for rustdoc_ngAlex Crichton-3/+1
This large commit implements and `html` output option for rustdoc_ng. The executable has been altered to be invoked as "rustdoc_ng html <crate>" and it will dump everything into the local "doc" directory. JSON can still be generated by changing 'html' to 'json'. This also fixes a number of bugs in rustdoc_ng relating to comment stripping, along with some other various issues that I found along the way. The `make doc` command has been altered to generate the new documentation into the `doc/ng/$(CRATE)` directories.
2013-09-19lexer: further slight improvements to lexer errorsBenjamin Herr-16/+30
2013-09-19lexer: report problematic chars verbatim or as escape sequenceBenjamin Herr-12/+23
... instead of giving their numeric codepoint, following the lead of fdaae34. So the error message for, say, '\_' mentions _ instead of 95, and '\●' now mentions \u25cf.
2013-09-19lexer: show correct span on lexical errorsBenjamin Herr-19/+59
Previously, the lexer calling `rdr.fatal(...)` would report the span of the last complete token, instead of a span within the erroneous token (besides one span fixed in 1ac90bb). This commit adds a wrapper around `rdr.fatal(...)` that sets the span explicilty, so that all fatal errors in `libsyntax/parse/lexer.rs` now report the offending code more precisely. A number of tests try to verify that, though the `compile-fail` testing setup can only check that the spans are on the right lines, and the "unterminated string/block comment" errors can't have the line marked at all, so that's incomplete. Closes #9149.
2013-09-18Register new snapshotsAlex Crichton-2/+1
2013-09-17Added support for a `\0` escape sequence.Daniel Rosenwasser-0/+2
This commit adds support for `\0` escapes in character and string literals. Since `\0` is equivalent to `\x00`, this is a direct translation to the latter escape sequence. Future builds will be able to compile using `\0` directly. Also updated the grammar specification and added a test for NUL characters.
2013-09-17auto merge of #9244 : thestinger/rust/drop, r=catamorphismbors-1/+1
This doesn't close any bugs as the goal is to convert the parameter to by-value, but this is a step towards being able to make guarantees about `&T` pointers (where T is Freeze) to LLVM.
2013-09-16switch Drop to `&mut self`Daniel Micay-1/+1
2013-09-16Update syntax testCorey Richardson-1/+123
2013-09-16Fix hardcoded string in libsyntaxCorey Richardson-24/+2
2013-09-15Remove {uint,int,u64,i64,...}::from_str,from_str_radixblake2-ppc-3/+3
Remove these in favor of the two traits themselves and the wrapper function std::from_str::from_str. Add the function std::num::from_str_radix in the corresponding role for the FromStrRadix trait.
2013-09-14auto merge of #9180 : blake2-ppc/rust/reduce-either, r=catamorphismbors-21/+15
Work a bit towards #9157 "Remove Either". These instances don't need to use Either and are better expressed in other ways (removing allocations and simplifying types).
2013-09-14syntax: Remove use of Either in parse.rsblake2-ppc-21/+15
The arg or capture type alias was actually never used for the capture case, so the code is simplified with `Either<arg, ()>` replaced by `arg`
2013-09-12std: Add Option.{result_or_default,or_default} that uses DefaultErick Tryzelaar-1/+1
2013-09-12std: rename Option::unwrap_or_default() to unwrap_or()Erick Tryzelaar-4/+4
2013-09-11Flag unsafe blocks from format! as compiler-generatedAlex Crichton-1/+1
2013-09-11Implement the notion of a "generated unsafe block"Alex Crichton-1/+1
This way syntax extensions can generate unsafe blocks without worrying about them generating unnecessary unsafe warnings. Perhaps a special keyword could be added to be used in macros, but I don't think that's the best solution.
2013-09-10change type of ExprLoop and ExprBreak elts from ident->name.John Clements-2/+2
Lots of downstream changes in librustc, should be infinitesimally faster.
2013-09-10Delay assignment of node ids until after expansion. Ensures that each AST nodeNiko Matsakis-102/+86
has a unique id. Fixes numerous bugs in macro expansion and deriving. Add two representative tests. Fixes #7971 Fixes #6304 Fixes #8367 Fixes #8754 Fixes #8852 Fixes #2543 Fixes #7654
2013-09-09auto merge of #9005 : alexcrichton/rust/rusty-log, r=brsonbors-10/+7
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-08syntax: implement labelled breaks for `for`.Huon Wilson-5/+10
`for` desugars to `loop` so it is trivial to just desugar to `loop` while retaining any label.
2013-09-06add test case, cleanupJohn Clements-2/+0
2013-09-06remove unneeded imports, clean up unused var warningsJohn Clements-5/+2
2013-09-06memoization for resolveJohn Clements-2/+2
2013-09-06uncomment mtwt_resolve callsJohn Clements-0/+20
2013-09-06add temporarily unused ctxt field to mac_invoc_ttJohn Clements-5/+5
2013-09-06commentsJohn Clements-8/+31
2013-09-06added gensym_copy mechanism to ensure sharing of pointers in the internerJohn Clements-40/+33
this makes comparisons constant-time, and enables spelling-comparison of identifiers, crucial in many parts of resolve.
2013-09-06added test for ptr_eq on fresh_name-generated identsJohn Clements-1/+32
2013-09-06re-add debug versionJohn Clements-0/+5
2013-09-06drop back to a simple gensym approach for fresh-name.John Clements-12/+3
this is necessary so that the new idents are connected to the original strings. this is important both for error messages, and so that top-level refs get connected to the right things.
2013-09-06adding test case to check marking/unmarkingJohn Clements-1/+6
2013-09-06add hygiene support fns, move them around.John Clements-7/+3
also adds test cases
2013-09-06compare macro tokens hygienically (commented out)John Clements-1/+4
2013-09-05Rename str::from_bytes to str::from_utf8, closes #8985Florian Hahn-1/+1
2013-09-05Remove the __log function for __log_levelAlex Crichton-10/+7
Also redefine all of the standard logging macros to use more rust code instead of custom LLVM translation code. This makes them a bit easier to understand, but also more flexibile for future types of logging. Additionally, this commit removes the LogType language item in preparation for changing how logging is performed.
2013-09-04stop treating char as an integer typeDaniel Micay-12/+21
Closes #7609
2013-09-03auto merge of #8939 : Kimundi/rust/master, r=huonwbors-307/+307