Skip to content

Commit

Permalink
CORE: Small fix for scanning identifiers
Browse files Browse the repository at this point in the history
  • Loading branch information
MineGame159 committed Jan 27, 2024
1 parent 59d76a5 commit 792194f
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions core/scanner/scanner.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,7 @@ func (s *Scanner) identifierKind() TokenKind {
case 'a':
return s.checkKeyword(2, "lse", False)
case 'n':
return Fn
return s.checkKeyword(2, "", Fn)
case 'o':
return s.checkKeyword(2, "r", For)
case 'u':
Expand All @@ -189,13 +189,13 @@ func (s *Scanner) identifierKind() TokenKind {
if s.currentI-s.startI > 1 {
switch s.text[s.startI+1] {
case 'f':
return If
return s.checkKeyword(2, "", If)
case 'm':
return s.checkKeyword(2, "pl", Impl)
case 'n':
return s.checkKeyword(2, "terface", Interface)
case 's':
return Is
return s.checkKeyword(2, "", Is)
}
}
case 'n':
Expand Down

0 comments on commit 792194f

Please sign in to comment.