diff options
author | Mark Rushakoff <mark.rushakoff@gmail.com> | 2018-02-28 18:20:07 +0800 |
---|---|---|
committer | Péter Szilágyi <peterke@gmail.com> | 2018-02-28 18:20:07 +0800 |
commit | 98ec5e50115b47670c1f3ffb2cc890ce4838c4d6 (patch) | |
tree | e7233e5147bc15d5f5c3d1c0bd3ed3942a335241 /core | |
parent | b574b5776695eb30e034fd8c7a468b3f03d4c6b9 (diff) | |
download | go-tangerine-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.gz go-tangerine-98ec5e50115b47670c1f3ffb2cc890ce4838c4d6.tar.zst go-tangerine-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.
Diffstat (limited to 'core')
-rw-r--r-- | core/asm/lexer.go | 4 |
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) } |