mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-19 22:10:33 +00:00
undocumented feature: JS backend: unit and group separators generate hash and at symbols
This commit is contained in:
@@ -1234,10 +1234,18 @@ proc genPatternCall(p: PProc; n: PNode; pat: string; typ: PType;
|
||||
genOtherArg(p, n, j, typ, generated, r)
|
||||
inc j
|
||||
inc i
|
||||
of '\31':
|
||||
# unit separator
|
||||
add(r.res, "#")
|
||||
inc i
|
||||
of '\29':
|
||||
# group separator
|
||||
add(r.res, "@")
|
||||
inc i
|
||||
else:
|
||||
let start = i
|
||||
while i < pat.len:
|
||||
if pat[i] notin {'@', '#'}: inc(i)
|
||||
if pat[i] notin {'@', '#', '\31', '\29'}: inc(i)
|
||||
else: break
|
||||
if i - 1 >= start:
|
||||
add(r.res, substr(pat, start, i - 1))
|
||||
|
||||
Reference in New Issue
Block a user