about summary refs log tree commit diff
path: root/src/libsyntax/parse/lexer
AgeCommit message (Collapse)AuthorLines
2018-04-12Change the hashcounts in raw `Lit` variants from usize to u16.Nicholas Nethercote-3/+3
This reduces the size of `Token` from 32 bytes to 24 bytes on 64-bit platforms.
2018-04-12Deprecate the std_unicode crateSimon Sapin-1/+1
2018-04-10Auto merge of #49390 - Zoxc:sync-syntax, r=michaelwoeristerbors-5/+4
More thread-safety changes r? @michaelwoerister
2018-04-06Use `Span` instead of `SyntaxContext` in `Ident`Vadim Petrochenkov-1/+1
2018-03-28Make ParseSess thread-safeJohn Kåre Alsaker-5/+4
2018-03-18Move raw_identifiers check to the lexer.Lymia Aluysia-0/+4
2018-03-18Feature gate raw identifiers.Lymia Aluysia-0/+1
2018-03-18Initial implementation of RFC 2151, Raw IdentifiersLymia Aluysia-23/+46
2018-03-18Auto merge of #48917 - petrochenkov:import, r=oli-obkbors-1/+1
syntax: Make imports in AST closer to the source and cleanup their parsing This is a continuation of https://github.com/rust-lang/rust/pull/45846 in some sense.
2018-03-17Rename `Span::empty` to `Span::shrink_to_lo`, add `Span::shrink_to_hi`Vadim Petrochenkov-1/+1
2018-03-17syntax: Make `_` an identifierVadim Petrochenkov-10/+4
2018-03-15Use a single Lock for CodeMap.stable_id_to_filemap and CodeMap.filesJohn Kåre Alsaker-1/+1
2018-03-14Remove syntax and syntax_pos thread localsJohn Kåre Alsaker-116/+143
2018-03-08Move REGISTERED_DIAGNOSTICS to a ParseSess fieldJohn Kåre Alsaker-0/+3
2018-03-04Add note for unterminated raw string errorGuillaume Gomez-8/+25
2018-03-02Replace Rc with Lrc for shared dataJohn Kåre Alsaker-22/+20
2018-02-01Improve char escaping in lexer messagesRyan Cumming-12/+19
Currently ', " and \ are escaped as \', \" and \\ respectively. This leads to confusing messages such as `error: unknown start of token: \\` when encountering a single backslash. Fix by emitting printable ASCII characters directly. This will still escape \r, \n, \t and Unicode characters. Fixes #47902
2018-01-29Toggle span highlighting on `-Zteach`Esteban Küber-0/+1
2018-01-26Do not capture stderr in the compiler. Instead just panic silently for fatal ↵John Kåre Alsaker-35/+34
errors
2018-01-06wherein careful doc-decoration arithmetic proves quite the ICE-breakerZack M. Davis-1/+1
This `horizontal_trim` function strips the leading whitespace from doc-comments that have a left-asterisk-margin: /** * You know what I mean— * * comments like this! */ The index of the column of asterisks is `i`, and if trimming is deemed possible, we slice each line from `i+1` to the end of the line. But if, in particular, `i` was 0 _and_ there was an empty line (as in the example given in the reporting issue), we ended up panicking trying to slice an empty string from 0+1 (== 1). Let's tighten our check to say that we can't trim when `i` is even the same as the length of the line, not just when it's greater. (Any such cases would panic trying to slice `line` from `line.len()+1`.) Resolves #47197.
2017-12-19Implement non-mod.rs mod statementsTaylor Cramer-0/+1
2017-12-14When attempting to write str with single quote suggest double quotesEsteban Küber-1/+27
2017-12-14Use PathBuf instead of String where applicableOliver Schneider-3/+4
2017-12-07address commentsAgustin Chiappe Berrini-1/+1
2017-12-06and refactor to just move the checkingAgustin Chiappe Berrini-13/+1
2017-11-28Fix hygiene bug.Jeffrey Seyfried-3/+10
2017-11-03Display spans correctly when there are non-half-width charactersWonwoo Choi-0/+1
2017-10-20Add short message-formatGuillaume Gomez-1/+3
2017-10-13Fix typo in libsyntax/parse/lexer/unicode_chars.rskennytm-1/+1
` (U+0060) should be the "grave" accent, not "Greek" accent.
2017-09-22Add support for `..=` syntaxAlex Burka-0/+3
Add ..= to the parser Add ..= to libproc_macro Add ..= to ICH Highlight ..= in rustdoc Update impl Debug for RangeInclusive to ..= Replace `...` to `..=` in range docs Make the dotdoteq warning point to the ... Add warning for ... in expressions Updated more tests to the ..= syntax Updated even more tests to the ..= syntax Updated the inclusive_range entry in unstable book
2017-09-12Auto merge of #43716 - MaloJaffre:_-in-literals, r=petrochenkovbors-40/+47
Accept underscores in unicode escapes Fixes #43692. I don't know if this need an RFC, but at least the impl is here!
2017-08-30Make fields of `Span` privateVadim Petrochenkov-24/+15
2017-08-17Accept underscores in unicode escapesMalo Jaffré-40/+47
Fixes #43692.
2017-08-15use field init shorthand EVERYWHEREZack M. Davis-9/+9
Like #43008 (f668999), but _much more aggressive_.
2017-08-11Rollup merge of #43779 - mattico:fix-unicode-typo, r=aidanhsGuillaume Gomez-1/+1
Fix typo in unicode char definition Reference: http://www.fileformat.info/info/unicode/char/16ed/index.htm
2017-08-09Fix typo in unicode char definitionMatt Ickstadt-1/+1
2017-08-09fix a typonicole mazzuca-1/+1
(this should not have been merged with this typo)
2017-08-06Fix typo in unicode_chars.rsMalo Jaffré-1/+1
2017-08-06Update the list of confusable charactersMalo Jaffré-19/+125
Also reorder and space the list to make it clearer for futures updates and to come closer to the original list. Thanks @est31 for the instructions. Fixes #43629. r? @est31
2017-07-05Merge remote-tracking branch 'origin/master' into proc_macro_apiAlex Crichton-1/+1
2017-06-29Change some terminology around keywords and reserved identifierspetrochenkov-1/+1
2017-06-26Address review comments.Jeffrey Seyfried-1/+1
2017-06-26Implement `quote!` and other `proc_macro` API.Jeffrey Seyfried-4/+8
2017-06-26Simplify `hygiene::Mark` application, andJeffrey Seyfried-20/+22
remove variant `Token::SubstNt` in favor of `quoted::TokenTree::MetaVar`.
2017-06-06Auto merge of #41990 - ↵bors-0/+9
qnighy:disallow-underscore-suffix-for-string-like-literals, r=nikomatsakis Disallow underscore suffix for string-like literals. This patch turns string/bytestring/char/byte literals followed by an underscore, like `"Foo"_`, to an error. `scan_optional_raw_name` will parse `_` as a valid raw name, but it will be rejected by the parser. I also considered just stopping parsing when the suffix is `_`, but in that case `"Foo"_` will be lexed as two valid tokens. Fixes the latter half of #41723.
2017-05-31Add warning cycle #42326.Masaki Hara-1/+14
2017-05-20remove "much" from unicode diagnosticAndy Russell-1/+1
2017-05-16Rollup merge of #41957 - llogiq:clippy-libsyntax, r=petrochenkovMark Simulacrum-62/+62
Fix some clippy warnings in libsyntax This is mostly removing stray ampersands, needless returns and lifetimes. Basically a lot of small changes.
2017-05-14Disallow underscore suffix for string-like literals.Masaki Hara-5/+1
2017-05-12Fix some clippy warnings in libsyntaxAndre Bogus-62/+62
This is mostly removing stray ampersands, needless returns and lifetimes.