Multi byte characters should not be treated as part of an operator
This commit is contained in:
parent
25a41d5d90
commit
fd28236368
3 changed files with 13 additions and 2 deletions
|
|
@ -25,7 +25,7 @@ const
|
||||||
SymChars*: set[char] = {'a'..'z', 'A'..'Z', '0'..'9', '\x80'..'\xFF'}
|
SymChars*: set[char] = {'a'..'z', 'A'..'Z', '0'..'9', '\x80'..'\xFF'}
|
||||||
SymStartChars*: set[char] = {'a'..'z', 'A'..'Z', '\x80'..'\xFF'}
|
SymStartChars*: set[char] = {'a'..'z', 'A'..'Z', '\x80'..'\xFF'}
|
||||||
OpChars*: set[char] = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.',
|
OpChars*: set[char] = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.',
|
||||||
'|', '=', '%', '&', '$', '@', '~', ':', '\x80'..'\xFF'}
|
'|', '=', '%', '&', '$', '@', '~', ':'}
|
||||||
|
|
||||||
# don't forget to update the 'highlite' module if these charsets should change
|
# don't forget to update the 'highlite' module if these charsets should change
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -130,7 +130,7 @@ proc nimNumber(g: var GeneralTokenizer, position: int): int =
|
||||||
|
|
||||||
const
|
const
|
||||||
OpChars = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.',
|
OpChars = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.',
|
||||||
'|', '=', '%', '&', '$', '@', '~', ':', '\x80'..'\xFF'}
|
'|', '=', '%', '&', '$', '@', '~', ':'}
|
||||||
|
|
||||||
proc nimNextToken(g: var GeneralTokenizer) =
|
proc nimNextToken(g: var GeneralTokenizer) =
|
||||||
const
|
const
|
||||||
|
|
|
||||||
11
tests/parser/tunicodeidents.nim
Normal file
11
tests/parser/tunicodeidents.nim
Normal file
|
|
@ -0,0 +1,11 @@
|
||||||
|
discard """
|
||||||
|
action: run
|
||||||
|
"""
|
||||||
|
|
||||||
|
# #7884
|
||||||
|
|
||||||
|
type Obj = object
|
||||||
|
ö: int
|
||||||
|
|
||||||
|
let o = Obj(ö: 1)
|
||||||
|
doAssert o.ö == 1
|
||||||
Loading…
Add table
Add a link
Reference in a new issue