From a8cc5d1379bbf3197e3e7a040cac2f7376a4949a Mon Sep 17 00:00:00 2001 From: ringabout <43030857+ringabout@users.noreply.github.com> Date: Thu, 29 Sep 2022 04:37:26 +0800 Subject: [PATCH] Unicode Operators are no longer experimental (#20444) * Unicode Operators are no longer experimental * fixes tests * Update doc/manual.md Co-authored-by: Andreas Rumpf --- changelog.md | 2 +- compiler/lexer.nim | 10 +++++----- compiler/options.nim | 4 ++-- doc/manual.md | 15 +++++++++++++++ doc/manual_experimental.md | 21 --------------------- tests/lexer/nim.cfg | 1 - 6 files changed, 23 insertions(+), 30 deletions(-) delete mode 100644 tests/lexer/nim.cfg diff --git a/changelog.md b/changelog.md index 4e6cf30b08..07ea9264f6 100644 --- a/changelog.md +++ b/changelog.md @@ -70,7 +70,7 @@ - Removed two type pragma syntaxes deprecated since 0.20, namely `type Foo = object {.final.}`, and `type Foo {.final.} [T] = object`. -- [Overloadable enums](https://nim-lang.github.io/Nim/manual.html#types-enumeration-types) +- [Overloadable enums](https://nim-lang.github.io/Nim/manual.html#overloadable-enum-value-names) and Unicode Operators are no longer experimental. - Removed the `nimIncrSeqV3` define. diff --git a/compiler/lexer.nim b/compiler/lexer.nim index d17300395f..dabb1c8fb0 100644 --- a/compiler/lexer.nim +++ b/compiler/lexer.nim @@ -907,7 +907,7 @@ proc getSymbol(L: var Lexer, tok: var Token) = inc(pos) suspicious = true of '\x80'..'\xFF': - if c in UnicodeOperatorStartChars and unicodeOperators in L.config.features and unicodeOprLen(L.buf, pos)[0] != 0: + if c in UnicodeOperatorStartChars and unicodeOprLen(L.buf, pos)[0] != 0: break else: h = h !& ord(c) @@ -943,7 +943,7 @@ proc getOperator(L: var Lexer, tok: var Token) = if c in OpChars: h = h !& ord(c) inc(pos) - elif c in UnicodeOperatorStartChars and unicodeOperators in L.config.features: + elif c in UnicodeOperatorStartChars: let oprLen = unicodeOprLen(L.buf, pos)[0] if oprLen == 0: break for i in 0..