gemath
e720bbdd76
Peg captures get stack-like behavior ( #18369 )
...
* Implements reverse capture indexing.
* Now works for modified backrefs too.
* Changed reverse indexing syntax prefix for back-references to '$^'.
2021-06-28 12:33:20 +02:00
Andrey Makarov
1b9b806007
rst: fix bug 20 from #17340 ( #18360 )
...
and a leftover bug: priority of option list inside definition list
2021-06-26 18:10:46 +02:00
Timothee Cour
b8f761b7e2
even lighter version of #17938 : fix most issues with UnusedImport, XDeclaredButNotUsed, etc; fix #17511 , #17510 , #14246 (without realModule) ( #18362 )
...
* {.used: symbol}
* add tests
* fix tests with --import
* --import works without giving spurious unused warnings
* new warning warnDuplicateModuleImport for `import foo; import foo`
* fix test, add resolveModuleAlias, use proper line info for module aliases
* fix spurious warnings
* fix deprecation msg for deprecated modules even with `import foo as bar`
* disable a test for i386 pending sorting XDeclaredButNotUsed errors
* UnusedImport now works with re-exported symbols
* fix typo [skip ci]
* ic support
* add genPNode to allow writing PNode-based compiler code similarly to `genAst`
* fix DuplicateModuleImport warning
* adjust test
* fixup
* fixup
* fixup
* fix after rebase
* fix for IC
* keep the proc inline, move the const out
* [skip ci] fix changelog
* experiment: remove calls to resolveModuleAlias
* followup
* fixup
* fix tests/modules/tselfimport.nim
* workaround tests/deprecated/tmodule1.nim
* fix properly
* simplify
2021-06-26 15:21:46 +02:00
tomc1998
f6bea08eac
Add sink annotation to option some() ( #18358 )
2021-06-25 22:06:24 +02:00
Timothee Cour
8535b26a75
docs now show nimExperimentalX APIs ( #18345 )
...
* docs now show nimExperimentalX APIs
* fix for windows
2021-06-25 16:47:10 +02:00
Smooth Operator
6be8a66833
couple tiny typo fixes ( #18344 )
2021-06-24 18:48:57 +01:00
Timothee Cour
565e07a993
enable VM tracing in user code via {.define(nimVmTrace).} ( #18244 )
...
* enable VM tracing in user code via `{.define(nimVmTrace).}`
* add vmutils.vmTrace
* add vmTrace
2021-06-24 11:55:31 +02:00
Andrey Makarov
0c8d3ae985
rst: allow comment to continue on second line ( #18338 )
2021-06-24 10:28:28 +02:00
flywind
496bd790e1
[std/times]getTime now uses high resolution API on windows ( #17901 )
2021-06-23 12:33:19 -07:00
Andreas Rumpf
0eee7f5727
OS.nim: style changes ( #18331 )
2021-06-23 14:39:10 +02:00
Andrey Makarov
9c43f05099
Markdown: allow to end URL with balanced parenthesis ( #18321 )
...
* Markdown: allow to end URL with balanced parenthesis
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* apply suggestion
* remove unnecessary if
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-23 07:50:05 +02:00
Timothee Cour
5badeea170
followup #18318 : simplify dollarImpl and add a test ( #18330 )
2021-06-22 21:42:39 -07:00
flywind
9a81e91fa5
merge similar procs regarding digits ( #18318 )
2021-06-22 17:02:32 +02:00
mantielero
d8488e41e8
readAsText supports both Blob and File ( fixes #18187 ) ( #18189 )
2021-06-21 21:19:11 -07:00
xioren
9d3a813fb9
convert code-blocks to runnableExamples in io ( #18315 )
...
Co-authored-by: konsumlamm <44230978+konsumlamm@users.noreply.github.com >
2021-06-21 18:56:16 -07:00
flywind
2deb7011f5
fixes #17768 [backport:1.4] ( #18317 )
...
* fixes #17768 [backport:1.4]
* tiny
2021-06-21 12:50:47 +02:00
Andrey Makarov
1b3c0f142d
validate rst field for :number-lines:, :status: ( #18304 )
2021-06-20 20:00:42 +02:00
Heiko Nickerl
92cb765714
Raise IndexDefect when deleting element at out of bounds index ( #17821 )
...
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
Co-authored-by: Heiko Nickerl <mail@hnicke.de >
Co-authored-by: Heiko Nickerl <heiko.nickerl@flipapp.de >
2021-06-20 08:56:33 -07:00
flywind
e45b858f04
[std/terminal] improve docs a bit ( #18296 )
...
* Revert "add missing import to asynchttpserver's example"
This reverts commit 7ef364a402 .
* alternative to #18185
* add std/mutexes
* cvlose #17696
* Revert "add std/mutexes"
This reverts commit 69abc8b649 .
* tiny
* test
* improve terminal docs
* follow advice
2021-06-20 09:57:59 +02:00
Timothee Cour
6030e139b5
move {.injectStmt.} to experimental; add a test ( #18300 )
...
* move {.injectStmt.} to experimental; add a test
* undocument and deprecat `.injectStmt` but keep its implementation until we have a replacement
2021-06-20 09:51:07 +02:00
Andrey Makarov
590d457631
docgen: move to shared RST state ( fix #16990 ) ( #18256 )
...
* docgen: move to shared RST state (fix #16990 )
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update compiler/docgen.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* Update lib/packages/docutils/rst.nim
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
* rename `cmdDoc2` to `cmdDoc`
* fix (P)RstSharedState convention
* new style of initialization
* misc suggestions
* 1 more rename
* fix a regression
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
Co-authored-by: Timothee Cour <timothee.cour2@gmail.com >
2021-06-20 09:50:03 +02:00
Timothee Cour
128d21be1c
add typetraits.pointerBase to return T in ref T|ptr T ( #18293 )
...
* add typetraits.deref to return T in ref T|ptr T
* deref => refBase
* refBase=>pointerBase
* [skip ci] address comment
2021-06-20 09:49:18 +02:00
Timothee Cour
7714ab468a
make privateAccess work with generic types and generic instantiations; fix a SIGSEGV ( #18260 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-19 11:24:46 -07:00
Timothee Cour
5600a62229
strformat.fmt now supports non-literal const strings ( #18274 )
...
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-18 08:57:51 -07:00
Adrian Veith
5a3456d220
fix for #18284 int32 should be int ( #18285 )
...
the var exp was typed as int32 - it should be int since frep expects an int
2021-06-17 11:23:38 +02:00
Andreas Rumpf
fd8b79707c
Revert "system/excpt: check if the exception is not nil before pop ( #18247 )" ( #18265 )
...
This reverts commit 0adb47aa15 .
2021-06-17 08:20:10 +02:00
Andrey Makarov
969cb97c0a
PCRE, nimgrep: add limit for buffer size ( #18280 )
2021-06-17 08:19:52 +02:00
flywind
c51680e701
fixes #17696 ( #18276 )
2021-06-16 11:31:20 +02:00
Mark Pointing
e80d7ff0f2
httpclient.nim Fixes #14794 and an issue where content-header is not set on postContent ( #18208 )
...
* Fixed missing newline after bound marker in mulipart post (#14794 ) and a problem where calling postContent with multipart data does not set content-length header.
* Update lib/pure/httpclient.nim
* Added comment outlining the reason for changes to httpclient.nim and added tests to ensure that multipart post has a newline at the end of the body, and that the content-length header is present.
* Fixed typo in comments.
* Removed redundant blank lines in thttpclient_standalone.nim.
Co-authored-by: Mark Pointing <mark@futurepoint.com.au >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-14 19:29:23 +02:00
alaviss
0adb47aa15
system/excpt: check if the exception is not nil before pop ( #18247 )
...
In CPS we would consume an exception in the except branch by stashing it
into a local then remove the exception from Nim environment so as not to
leak it to other code that would be running before the continuation
continues
However since popCurrentException() assumes that the exception always
exist, removing the exception from an except branch will cause a
SIGSEGV to happen. This commit fixes that.
2021-06-14 18:26:12 +02:00
Timothee Cour
e1e8af535e
merge BuildMode into SuccessX, remove code duplication w drnim, add useful info to successx, add gc to compilesettings ( #18252 )
...
* merge BuildMode into SuccessX, add more info
* refactor duplicated with drnim
* fixup
* address comment
2021-06-14 08:51:40 +02:00
Federico Ceratto
a266c54921
Improve httpClient docs on SSL cert verification ( #15201 )
...
* Improve httpClient docs on SSL cert verification
Cert verification is enabled by default after CVE-2021-29495
* Update httpclient.nim
Co-authored-by: Dominik Picheta <dominikpicheta@googlemail.com >
2021-06-13 16:50:04 +01:00
Timothee Cour
c871e22da2
fix #7717 roundtrip float to string; fix parseFloat for js ( #18248 )
...
* refs #7717 roundtrip float to string
* make parseFloat more correct
* improve float tests
* improve float tests
* cleanup
2021-06-13 07:32:47 +02:00
Miran
57609902c4
use more meaningful name than "workaround14447" ( #18237 )
2021-06-11 10:07:23 +02:00
flywind
6b97889f44
fix #9437(fix re.replace wrong behaviour) ( #17546 )
...
* fix nim js cmp fails at CT
* fix
2021-06-10 18:26:58 +02:00
Fröhlich A
7bf0404dd8
#18216 make moveDir work across partitions on windows ( #18223 )
...
* return false if AccessDeniedError in tryMoveFSObject - fixes #18216
* add moveDir & moveFile tests
* rename `isMoveDir` parameter to `isDir`
2021-06-10 14:28:00 +02:00
Andreas Rumpf
0a4858dc59
fixes #18220 ( #18227 )
2021-06-10 09:25:51 +02:00
Timothee Cour
79ded694d7
avoid re-exporting options from std/wrapnils ( #18222 )
2021-06-10 07:00:34 +02:00
Andreas Rumpf
21f3b8539a
fixes #18088 ( #18209 )
2021-06-07 17:22:35 +02:00
flywind
5bad022d58
alternative to #18185 ( #18206 )
2021-06-07 15:32:37 +02:00
Bung
429b128632
change mimedb stroe stringtable to orderedtable ( #18065 )
...
* change mimedb stroe stringtable to orderedtable
* Update lib/pure/mimetypes.nim
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2021-06-07 13:57:42 +02:00
slangmgh
e7aa41ff3f
fix 18186 with adding importc _umul128 ( #18200 )
2021-06-07 11:42:32 +02:00
Timothee Cour
9c6259e557
up to 20x faster jsonutils deserialization ( #18183 )
...
* up to 20x faster jsonutils deserialization
* noinline
2021-06-05 09:45:37 +02:00
Andrey Makarov
9c0666e0bb
rst: remove roSkipPounds option ( #18175 )
2021-06-05 09:12:37 +02:00
Rainbow Asteroids
295429f425
add dom.scrollIntoView with options; refs #18093 ( #18181 )
2021-06-05 09:07:26 +02:00
Timothee Cour
3cc547f2df
macros.treeRepr + friends: collapse SymChoice ( #18072 )
...
* macros.treeRepr + friends: collapse SymChoice
* make repr+friends work with invalid symchoice nodes
* address comment
2021-06-05 06:58:26 +02:00
Euan
a2b6081256
Ref #18177 - lbgc.so.5.0 on OpenBSD 6.9 ( #18180 )
2021-06-04 15:46:57 -07:00
Timothee Cour
cc7ec5a6a4
fix #7295 : use move(result) inside template to avoid copy with --gc:refc ( #18168 )
2021-06-04 15:32:46 -07:00
flywind
a77360da5b
workaround bug in sharedtables.withValue to unblock frozen CI on OSX ( #18172 )
2021-06-04 12:41:13 -07:00
Timothee Cour
654a20166e
simplify extccomp.nim json logic via jsonutils; fix #18084 ( #18100 )
...
* simplify extccomp.nim json logic via jsonutils
* fix #18084
* simplify further
* workaround for bootstrap that can be removed after updating csources_v1 >= 1.2
2021-06-03 22:29:45 +02:00