diff options
author | quantimnot <54247259+quantimnot@users.noreply.github.com> | 2023-03-04 01:57:30 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-03-04 07:57:30 +0100 |
commit | 6994e1b1d7962f9c61887c7e606aeccbebf9bef6 (patch) | |
tree | ca3943ee6ecb2a49d141a5842aaaadc8221d06c6 | |
parent | b2c5f8a05f2f9db6ed06663a077882eb112b3e3f (diff) | |
download | Nim-6994e1b1d7962f9c61887c7e606aeccbebf9bef6.tar.gz |
`--embedsrc` for JavaScript (#21467)
Co-authored-by: quantimnot <quantimnot@users.noreply.github.com>
-rw-r--r-- | compiler/jsgen.nim | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/compiler/jsgen.nim b/compiler/jsgen.nim index 5df40b996..d0a143793 100644 --- a/compiler/jsgen.nim +++ b/compiler/jsgen.nim @@ -735,6 +735,8 @@ proc genLineDir(p: PProc, n: PNode) = let line = toLinenumber(n.info) if line < 0: return + if optEmbedOrigSrc in p.config.globalOptions: + lineF(p, "//$1$n", [sourceLine(p.config, n.info)]) if optLineDir in p.options or optLineDir in p.config.options: lineF(p, "$1", [lineDir(p.config, n.info, line)]) if hasFrameInfo(p): |