fix syntax of the key expression (#4586)

This commit is contained in:
kesonan
2025-01-18 23:46:24 +08:00
committed by GitHub
parent 3d931d7030
commit b650c8c425
9 changed files with 127 additions and 69 deletions

View File

@@ -444,16 +444,6 @@ func (s *Scanner) scanIdent() token.Token {
}
ident := string(s.data[position:s.position])
if s.ch == ':' {
s.readRune()
return token.Token{
Type: token.KEY,
Text: string(s.data[position:s.position]),
Position: s.newPosition(position),
}
}
if ident == "interface" && s.ch == '{' && s.peekRune() == '}' {
s.readRune()
s.readRune()