quantimnot
b2b23d723a
Fix macros.quote custom op symbol interpolation. ( #17256 )
...
Provides a workaround/fix for #7589 .
https://github.com/nim-lang/Nim/issues/7589
Updated docs and tutorial to reflect change.
Updated runnableExamples to include an example.
Co-authored-by: name <name@example.com >
2021-03-05 14:41:33 +01:00
Danil Yarantsev
82d8e9bff3
Replace double backticks with single backticks - Part 2 out of ~6 ( #17206 )
2021-02-28 23:15:26 -08:00
Danil Yarantsev
56461c280f
Change stdlib imports to use std prefix in most examples ( #17202 )
2021-02-28 13:17:19 -08:00
flywind
9450bf6c08
use single backtick ( #17100 )
2021-02-18 22:47:21 -08:00
Timothee Cour
b9994925f5
remove all uses of condsyms symbols defined prior to bootstrap nim 0.20.0 ( #16918 )
...
* nimNoArrayToCstringConversion deadcode
* nimbabel deadcode
* nimHasalignOf deadcode
* nimvarargstyped deadcode
* nimhygiene deadcode
* nimNewTypedesc deadcode
* nimlocks deadcode
* nimHasCppDefine deadcode
* nimHasRunnableExamples deadcode
* nimHasNilChecks deadcode
* nimSymKind deadcode
* minor macros refactoring
* nimVmEqIdent deadcode
* nimNoNil deadcode
* nimNoZeroTerminator deadcode
* nimHasSymOwnerInMacro deadcode
* nimVmExportFixed deadcode
* nimNewRuntime deadcode
* nimAshr deadcode
* nimUncheckedArrayTyp deadcode
* nimHasTypeof deadcode
* nimErrorProcCanHaveBody deadcode
* nimHasHotCodeReloading deadcode
* nimHasSignatureHashInMacro deadcode
* nimHasDefault deadcode
* nimMacrosSizealignof deadcode
2021-02-17 09:32:36 +01:00
flywind
d447c0fe3f
use typeof instead type ( #16962 )
2021-02-08 09:46:07 +01:00
flywind
4e1e231e29
fix floats slice ( #16853 )
...
* see whether it breaks
* fix
* fix
* minor
* fix
* add enum
* use Ordinal types
* fix tests
* fix
* another style
* fix remainning cases
2021-01-29 12:26:36 +01:00
flywind
b727217229
refactor cmpNimIdentifier ( #16611 )
...
* refactor cmpNimIdentifier
* Apply suggestions from code review
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-01-13 12:29:30 +01:00
Timothee Cour
c21360e67a
macros.quote: document hard to use op; add more useful examples ( #16489 )
...
* macros.quote: document hard to use `op`; add more useful examples
* add back doc comment removed in a60305fbf3
* address comment
* fixup
* clarify quoting rules
* Update lib/core/macros.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2021-01-06 19:28:17 +01:00
flywind
5fb56a3b2c
refactor cmpIgnoreStyle and cmpIgnoreCase ( #16399 )
...
* init
* support strutils
* more
* better
* Call len once per string/cstring
* Change var to let
* Compare ternary on first char
* More appropriate param name
* fix
* better
* one test
* impl
* more efficient
* minor
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-12-31 11:54:40 +01:00
flywind
78acf1becb
fix cmpIgnoreStyle bug ( #16392 )
2020-12-18 16:29:36 +01:00
Aditya Siram
23447ffdce
Fixes #16219 , hasArgOfName ignoring argument sets. ( #16233 )
...
* Fixes #16219 , `hasArgOfName` ignoring argument sets.
* Fix test and simplify ident traversal.
* Moved test into a block and removed some boilerplate.
* Fix some argument formatting.
* use ..<
* Change the preceding line too
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-12-03 13:40:28 +01:00
flywind
e4d0f9f3de
typeinfo minor improvement ( #16083 )
...
* typeinfo minor improvement
* minor
* Update lib/core/typeinfo.nim
* rename typeinfo
2020-11-23 22:56:30 +01:00
flywind
6cf5ca1dc2
alternative way to fix #16022 ( #16064 ) [backport:1.4]
...
* alternative way to fix #16022
* add testcase for #16022
[backport:1.4]
2020-11-20 09:06:18 +01:00
Andreas Rumpf
fc735e4b08
fix #15934 and #15620 ( #15938 ) [backport:1.4]
...
* make workaround for #15934 and #15620
* add testcase for #9754
2020-11-15 18:12:53 +01:00
flywind
0f53b129b7
nil
2020-11-13 15:28:22 +08:00
flywind
077eba7b38
make workaround for #15934 and #15620
2020-11-12 23:24:45 +08:00
Miran
bbe49a14ae
Correct all eggs ( #15906 )
...
* "eg" is a misspelled "egg", "e.g." is "exempli gratia"
* Also, "ie" is "i.e.".
2020-11-10 21:53:25 +01:00
cooldome
0956a99537
ARC now capable of custom extra alignment. Ref, closure and seq support. ( #15697 )
2020-10-28 14:00:49 +01:00
shirleyquirk
4ef255b69d
fix rlock compilation failure ( #15584 )
...
* change SysLockType_Reentrant
fix edge case where using SysLockType_Reentrant doesn't trigger an #include pthread.h
* syslocktype_reentrant now a var
* remove nodecl to remove empty system_syslocks.c
* let is better than var.
in reality SysLockType = enum, maybe that would be a better fix
2020-10-15 12:54:01 +02:00
Andreas Rumpf
8b66412a8b
fixes #9754 [backport] ( #15342 )
2020-09-16 19:41:14 +02:00
Andreas Rumpf
fd31e8ff6f
allow old styled RTTI for arc/orc ( #15331 )
2020-09-16 14:57:01 +02:00
Timothee Cour
169ca37d26
enable,document,test getImplTransformed, very useful for understanding how nim transforms code ( #14924 )
...
* enable,document,test getImplTransformed, very useful for understanding how nim transforms code
2020-07-18 10:49:36 +02:00
Juan Carlos
9465b5db44
Clean up macros ( #14959 )
2020-07-14 16:44:56 +02:00
Timothee Cour
2867a33ebc
fix #14846 ; add macros.extractDocCommentsAndRunnables ( #14849 )
...
* fix #14846 ; add macros.extractDocCommentsAndRunnables
* fixup
* update tests
* address comment
2020-07-01 09:26:23 +02:00
Andreas Rumpf
da29222f86
init checks and 'out' parameters ( #14521 )
...
* I don't care about observable stores
* enforce explicit initializations
* cleaner code for the stdlib
* stdlib: use explicit initializations
* make tests green
* algorithm.nim: set result explicitly
* remove out parameters and bring the PR into a mergable state
* updated the changelog
2020-06-23 10:53:57 +02:00
Timothee Cour
9c42ae91b7
add legacy workaround; improve test so that it actually tests for the bugfix
2020-06-19 09:53:06 +02:00
solo989
408518c9fe
Update tuple newLit
2020-06-19 09:53:06 +02:00
Miran
e7f280bd26
Remove deprecated stuff from stdlib ( #14699 )
...
* update to the latest Jester
* remove deprecated procs from some stdlib modules
* 'criterion' is not maintained anymore and relies on obsolete stuff
2020-06-17 15:25:02 +02:00
Timothee Cour
8619534293
remove compilerproc from newIdentNode ( #14692 )
2020-06-17 08:10:34 +02:00
solo989
bdd2c25e9f
Update macros.nim ( #14697 )
2020-06-17 07:57:04 +02:00
Timothee Cour
dfe51d10a1
addQuitProc now works with closures, and c, js(node/browser) backend; fix some bugs in testament (#14342 )
...
* make addQuitProc great again
* fix bugs in testament
* fix test
* change 2016 => 2020
* addQuitProc => addExitProc + locks
* move to std/exitprocs
2020-06-16 11:43:48 +02:00
solo989
3cbf59336d
Update newLit set[T] to work when set is empty. ( #14662 )
...
* Update macros.nim
* Update lib/core/macros.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-06-15 09:15:17 +02:00
Timothee Cour
e30a08103d
remove tyOpt, mOpt ( #14636 )
...
* remove tyOpt, mOpt
* fixup
2020-06-12 11:03:52 +02:00
Andy Davidoff
8018449319
simple typo in locks.nim ( #14297 )
2020-05-11 02:59:31 -04:00
hlaaftana
fbc97e712a
move since from inclrtl to std/private/since ( #14188 )
...
* move since from inclrtl to std/private/since
* move since import in system below for HCR
2020-05-02 23:51:59 +02:00
cooldome
3b5a504692
parseEnum_regression ( #14150 )
...
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-04-28 19:56:50 +02:00
Jacek Sieka
7d6cbf290a
Error -> Defect for defects ( #13908 )
...
* Error -> Defect for defects
The distinction between Error and Defect is subjective,
context-dependent and somewhat arbitrary, so when looking at an
exception, it's hard to guess what it is - this happens often when
looking at a `raises` list _without_ opening the corresponding
definition and digging through layers of inheritance.
With the help of a little consistency in naming, it's at least possible
to start disentangling the two error types and the standard lib can set
a good example here.
2020-04-28 19:56:01 +02:00
Arne Döring
4005f0d0e4
forward type alignment information to seqs ( #12430 )
2020-04-19 07:52:01 +02:00
Juan Carlos
c6586322ba
Fix a 'See XXX' on documentation, clean out ( #13820 )
2020-03-31 21:21:49 +02:00
Jasper Jenkins
122751aa52
add nnkMacroDef to RoutineNodes ( #13676 )
2020-03-17 23:41:07 +01:00
Arne Döring
f95eef99a9
add expectIdent to macros ( #12778 )
...
* add expectIdent to macros
* apply feedback
* Update lib/core/macros.nim
Co-Authored-By: Clyybber <darkmine956@gmail.com >
* Update texpectIdent2.nim
* Update texpectIdent1.nim
Co-authored-by: Clyybber <darkmine956@gmail.com >
Co-authored-by: Andreas Rumpf <rumpf_a@web.de >
2020-03-11 08:27:31 +01:00
Arne Döring
eb42f38088
Remove dead magics ( #13551 )
2020-03-03 12:42:43 +01:00
hlaaftana
84e78b4ffc
Minor doc change in macros, future -> sugar ( #13475 ) [ci skip]
2020-02-24 09:57:15 +01:00
Clyybber
f6d45b40a5
expectLen now shows the length that we got ( #13387 )
2020-02-11 12:31:52 +01:00
Miran
352232e62d
style fix: change 'JS' to 'js' to make it consistent ( #13168 )
2020-01-16 14:14:03 +01:00
b3liever
8bcc7e8b9e
basename supports pragmaexpr ( #13045 )
...
* basename supports pragmaexpr
* update changelog
2020-01-07 11:25:51 +01:00
Andreas Rumpf
83a736a34a
ARC: cycle detector ( #12823 )
...
* first implementation of the =trace and =dispose hooks for the cycle collector
* a cycle collector for ARC: progress
* manual: the .acyclic pragma is a thing once again
* gcbench: adaptations for --gc:arc
* enable valgrind tests for the strutils tests
* testament: better valgrind support
* ARC refactoring: growable jumpstacks
* ARC cycle detector: non-recursive algorithm
* moved and renamed core/ files back to system/
* refactoring: --gc:arc vs --gc:orc since 'orc' is even more experimental and we want to ship --gc:arc soonish
2019-12-17 17:37:50 +01:00
Andreas Rumpf
3fbb3bfd3f
ARC related bugfixes and refactorings ( #12781 )
2019-12-05 16:59:06 +01:00
Araq
72237e2bcf
ARC: ported the GC tests over to --gc:arc
2019-11-26 16:04:28 +01:00