Bit shift assignment tokens now have correct width

This commit is contained in:
Sasha Koshka 2022-08-30 01:35:40 -04:00
parent 067729d435
commit eed9e4e7b9
1 changed files with 2 additions and 2 deletions

View File

@ -290,7 +290,7 @@ func (lexer *LexingOperation) tokenizeSymbolBeginning () (err error) {
if lexer.char == '=' {
token.kind = TokenKindLShiftAssignment
err = lexer.nextRune()
token.location.SetWidth(2)
token.location.SetWidth(3)
}
} else if lexer.char == '=' {
token.kind = TokenKindLessThanEqualTo
@ -310,7 +310,7 @@ func (lexer *LexingOperation) tokenizeSymbolBeginning () (err error) {
if lexer.char == '=' {
token.kind = TokenKindRShiftAssignment
err = lexer.nextRune()
token.location.SetWidth(2)
token.location.SetWidth(3)
}
} else if lexer.char == '=' {
token.kind = TokenKindGreaterThanEqualTo