StringStream & more stdlib modules support for JS/NimScript (#14095)
* StringStream & more stdlib modules support for JS/NimScript * change back pegs test in line with #14134
This commit is contained in:
parent
d5ed4fba3e
commit
cd9af6b804
22 changed files with 852 additions and 356 deletions
|
|
@ -52,7 +52,7 @@ runnableExamples:
|
|||
import
|
||||
hashes, strutils
|
||||
|
||||
when defined(js):
|
||||
when defined(js) or defined(nimscript):
|
||||
{.pragma: rtlFunc.}
|
||||
else:
|
||||
{.pragma: rtlFunc, rtl.}
|
||||
|
|
@ -298,7 +298,7 @@ proc raiseFormatException(s: string) =
|
|||
proc getValue(t: StringTableRef, flags: set[FormatFlag], key: string): string =
|
||||
if hasKey(t, key): return t.getOrDefault(key)
|
||||
# hm difficult: assume safety in taint mode here. XXX This is dangerous!
|
||||
when defined(js):
|
||||
when defined(js) or defined(nimscript):
|
||||
result = ""
|
||||
else:
|
||||
if useEnvironment in flags: result = os.getEnv(key).string
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue