diff options
-rw-r--r-- | compiler/lexer.nim | 2 | ||||
-rw-r--r-- | lib/packages/docutils/highlite.nim | 2 | ||||
-rw-r--r-- | tests/parser/tunicodeidents.nim | 11 |
3 files changed, 13 insertions, 2 deletions
diff --git a/compiler/lexer.nim b/compiler/lexer.nim index 591561987..d498cf4af 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -25,7 +25,7 @@ const SymChars*: set[char] = {'a'..'z', 'A'..'Z', '0'..'9', '\x80'..'\xFF'} SymStartChars*: set[char] = {'a'..'z', 'A'..'Z', '\x80'..'\xFF'} OpChars*: set[char] = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.', - '|', '=', '%', '&', '$', '@', '~', ':', '\x80'..'\xFF'} + '|', '=', '%', '&', '$', '@', '~', ':'} # don't forget to update the 'highlite' module if these charsets should change diff --git a/lib/packages/docutils/highlite.nim b/lib/packages/docutils/highlite.nim index 4f1264c9e..fbd2d7eca 100644 --- a/lib/packages/docutils/highlite.nim +++ b/lib/packages/docutils/highlite.nim @@ -130,7 +130,7 @@ proc nimNumber(g: var GeneralTokenizer, position: int): int = const OpChars = {'+', '-', '*', '/', '\\', '<', '>', '!', '?', '^', '.', - '|', '=', '%', '&', '$', '@', '~', ':', '\x80'..'\xFF'} + '|', '=', '%', '&', '$', '@', '~', ':'} proc nimNextToken(g: var GeneralTokenizer) = const diff --git a/tests/parser/tunicodeidents.nim b/tests/parser/tunicodeidents.nim new file mode 100644 index 000000000..3347eb7a9 --- /dev/null +++ b/tests/parser/tunicodeidents.nim @@ -0,0 +1,11 @@ +discard """ + action: run +""" + +# #7884 + +type Obj = object + ö: int + +let o = Obj(ö: 1) +doAssert o.ö == 1 |