aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Rushakoff <mark.rushakoff@gmail.com>2018-02-28 18:20:07 +0800
committerPéter Szilágyi <peterke@gmail.com>2018-02-28 18:20:07 +0800
commit98ec5e50115b47670c1f3ffb2cc890ce4838c4d6 (patch)
treee7233e5147bc15d5f5c3d1c0bd3ed3942a335241
parentb574b5776695eb30e034fd8c7a468b3f03d4c6b9 (diff)
downloaddexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.gz
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.bz2
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.lz
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.xz
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.zst
dexon-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.zip
core/asm: rename isAlphaNumeric to isLetter (#16212)
The function would return false for numbers, so isLetter is a more accurate description of the behavior.
-rw-r--r--core/asm/lexer.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/core/asm/lexer.go b/core/asm/lexer.go
index a34b2cbd8..405499950 100644
--- a/core/asm/lexer.go
+++ b/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)
}