Ver código fonte

core/asm: rename isAlphaNumeric to isLetter (#16212)

The function would return false for numbers, so isLetter is a more
accurate description of the behavior.
Mark Rushakoff 7 anos atrás
pai
commit
98ec5e5011
1 arquivos alterados com 2 adições e 2 exclusões
  1. 2 2
      core/asm/lexer.go

+ 2 - 2
core/asm/lexer.go

@@ -206,7 +206,7 @@ func lexLine(l *lexer) stateFn {
 			return lexComment
 		case isSpace(r):
 			l.ignore()
-		case isAlphaNumeric(r) || r == '_':
+		case isLetter(r) || r == '_':
 			return lexElement
 		case isNumber(r):
 			return lexNumber
@@ -278,7 +278,7 @@ func lexElement(l *lexer) stateFn {
 	return lexLine
 }
 
-func isAlphaNumeric(t rune) bool {
+func isLetter(t rune) bool {
 	return unicode.IsLetter(t)
 }