mirror of
https://github.com/rust-lang/rust-analyzer.git
synced 2025-09-27 12:29:21 +00:00
Replace SyntaxKind usage with T! macro where applicable
This commit is contained in:
parent
e1430d822e
commit
e618d12903
12 changed files with 50 additions and 44 deletions
|
@ -15,8 +15,16 @@ use super::*;
|
|||
// let _ = b"e";
|
||||
// let _ = br"f";
|
||||
// }
|
||||
pub(crate) const LITERAL_FIRST: TokenSet =
|
||||
TokenSet::new(&[TRUE_KW, FALSE_KW, INT_NUMBER, FLOAT_NUMBER, BYTE, CHAR, STRING, BYTE_STRING]);
|
||||
pub(crate) const LITERAL_FIRST: TokenSet = TokenSet::new(&[
|
||||
T![true],
|
||||
T![false],
|
||||
INT_NUMBER,
|
||||
FLOAT_NUMBER,
|
||||
BYTE,
|
||||
CHAR,
|
||||
STRING,
|
||||
BYTE_STRING,
|
||||
]);
|
||||
|
||||
pub(crate) fn literal(p: &mut Parser) -> Option<CompletedMarker> {
|
||||
if !p.at_ts(LITERAL_FIRST) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue