From cb362626f326a565aca34c1a11c95dcb7152b798 Mon Sep 17 00:00:00 2001 From: Aleksey Kladov Date: Mon, 1 Jan 2018 18:58:46 +0300 Subject: Parser: guess what? Groundwork! --- src/lexer/mod.rs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/lexer/mod.rs') diff --git a/src/lexer/mod.rs b/src/lexer/mod.rs index 7c4259763..bc5344b5f 100644 --- a/src/lexer/mod.rs +++ b/src/lexer/mod.rs @@ -187,6 +187,9 @@ fn scan_ident(c: char, ptr: &mut Ptr) -> SyntaxKind { return if c == '_' { UNDERSCORE } else { IDENT }; } ptr.bump_while(is_ident_continue); + if let Some(kind) = ident_to_keyword(ptr.current_token_text()) { + return kind; + } IDENT } -- cgit v1.2.3