mirror of
https://gitlab.com/pulsechaincom/go-pulse.git
synced 2025-01-03 09:17:38 +00:00
core/asm: rename isAlphaNumeric to isLetter (#16212)
The function would return false for numbers, so isLetter is a more accurate description of the behavior.
This commit is contained in:
parent
b574b57766
commit
98ec5e5011
@ -206,7 +206,7 @@ func lexLine(l *lexer) stateFn {
|
|||||||
return lexComment
|
return lexComment
|
||||||
case isSpace(r):
|
case isSpace(r):
|
||||||
l.ignore()
|
l.ignore()
|
||||||
case isAlphaNumeric(r) || r == '_':
|
case isLetter(r) || r == '_':
|
||||||
return lexElement
|
return lexElement
|
||||||
case isNumber(r):
|
case isNumber(r):
|
||||||
return lexNumber
|
return lexNumber
|
||||||
@ -278,7 +278,7 @@ func lexElement(l *lexer) stateFn {
|
|||||||
return lexLine
|
return lexLine
|
||||||
}
|
}
|
||||||
|
|
||||||
func isAlphaNumeric(t rune) bool {
|
func isLetter(t rune) bool {
|
||||||
return unicode.IsLetter(t)
|
return unicode.IsLetter(t)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user