konsumlamm
2e8325a19c
Remove support for named procs with sugar.=> ( #17220 )
...
* Add docs & tests for named procs with sugar.=>
* Remove support for named procs in sugar.=>
* Resolve conflict
* Fix test
2021-03-05 12:08:03 +01:00
hlaaftana
6a7baff97d
rename case statement macro from match to case ( #16923 )
...
* rename case statement macro from match to `case`
* fix test
2021-02-08 19:35:06 +01:00
hlaaftana
1d1b3f79fd
fix broken => for typed procs with pragmas ( #16190 )
...
* fix broken => for typed procs with pragmas
* add more sugar tests
* add ending quote
2020-12-01 12:01:36 +01:00
Timothee Cour
b809562c7c
make megatest consistent with unjoined tests wrt newlines, honor newlines in output spec ( #16151 )
...
* fix megatest newlines
* still allow missing trailing newline for now but in a more strict way than before
2020-11-28 09:09:31 +01:00
cooldome
2f1a9eadd7
More on #16110 ( #16130 )
...
* fix #16110
* refs #16110
* fix comment
* Trigger build
* use shallowCopy for efficiency
2020-11-26 13:44:06 +00:00
Timothee Cour
3e7077ac7d
fix #14339 , #13511 , #14420 : fixes limited VM support for addr ( #16002 )
...
* fix #14339 : fixes limited VM support for addr
* strengthen test
* reference bug #16003
* also fixes #13511
* also fixes #14420
2020-11-25 20:48:10 +01:00
cooldome
1d14b2c9e6
fix #16110 ( #16117 )
2020-11-24 15:49:14 +01:00
Andrey R (cooldome)
9a2a83ad71
Revert "fix #16110 "
...
This reverts commit f8b9d8c190 .
2020-11-24 12:11:13 +00:00
Andrey R (cooldome)
f8b9d8c190
fix #16110
2020-11-24 11:53:55 +00:00
flywind
1bcc352137
close #14847(add testcase for #14847 ) ( #16045 )
2020-11-19 08:31:54 +01:00
flywind
ae86df12af
add testcase for #14227 ( #15794 )
2020-10-30 15:53:45 +01:00
Andreas Rumpf
92163fa330
implements https://github.com/nim-lang/RFCs/issues/258 ( #15503 )
...
* implements https://github.com/nim-lang/RFCs/issues/258
* don't be too strict with custom pragma blocks
* cast pragmas: documentation
* added most missing inference query procs to effecttraits.nim
2020-10-06 16:47:15 +02:00
alaviss
fc973b2c0c
renderer: use the biggest integer type for masking literals ( #15482 )
...
On 32-bit system the mask would have a size of 32-bit, which is smaller
than the BiggestInt (usually 64-bit) it was masked against.
For some reason this only affect 32-bit Windows but not 32-bit Linux.
Might just be a difference in how gcc handle out of bound shifts for
Windows and Linux.
2020-10-04 00:39:56 +02:00
Andreas Rumpf
1f4b9cebd4
Added std/effecttraits.nim ( #15462 )
2020-10-02 17:22:31 +02:00
cooldome
f21a49b2c4
Fix #15389 ( #15390 )
...
* allow result symbol reuse
* try different approach
* Revert "try different approach"
This reverts commit abcfb6b759 .
2020-09-24 00:07:30 +01:00
Clyybber
4b9eea2fcc
Fix forward declarations in shadow scope contexts ( #15386 )
...
* Fix forward declarations in shadow scope contexts
* Add testcase for #15385
* Less empty lines
* Fix tests
* Inline isShadowScope
* Add original testcase (with reduced amount of iterations)
* Add testcase without forward decl
2020-09-22 18:24:13 +02:00
cooldome
d938c6411e
fix #15326 ( #15341 )
2020-09-16 21:37:23 +02:00
cooldome
341be0b61c
proc params as syms ( #15332 )
...
* proc params are now syms
* Fix typesrenderer
* Add testcase for disrupteks issue
* fix test
* Trigger build
* Trigger build
* Trigger build
Co-authored-by: Clyybber <darkmine956@gmail.com >
2020-09-16 17:25:24 +01:00
Miran
c49b88163c
"for-loop macros" are no longer an experimental feature ( #15288 )
2020-09-08 14:25:25 +02:00
Clyybber
fb58066b61
Fix #5691 ( #15158 )
...
* Fix #5691
* Cleanup and thoughts
* Use scope approach
* Seperate defined/declared/declaredInScope magics
* Fix declaredInScope
* Update spec accordingly
2020-08-27 15:50:59 +02:00
Clyybber
2629d619a1
Fix forward declaration issues in template/macro context ( #15091 )
...
* Fix forward declaration issues in template/macro context
* Correct forward declaration resolving for overloads
* Remove old dead code
* WIP consistent gensym ids
* Minimize diff
* Remove obsoleted hack
* Add templInstCounter to give unique IDs to template instantiations
* Remove obsoleted code
* Eh, init in myOpen, not myProcess...
* Remove optNimV019
* Add testcase for #13484
2020-07-29 16:17:20 +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
Clyybber
695a537c05
Closes #13253
2020-07-14 19:50:42 +02:00
Juan Carlos
9465b5db44
Clean up macros ( #14959 )
2020-07-14 16:44:56 +02:00
Clyybber
9016dd96ee
Add testcase for #12129 ( #14940 )
...
* Add testcase for #12129
* Fix test
2020-07-08 22:04:21 +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
cooldome
e5b64af831
Implement rendering of []=, {}, {}= braces ( #14539 )
...
* render curly braces
* fix typo
* fix test
Co-authored-by: cooldome <ariabushenko@bk.ru >
2020-06-01 19:56:17 +02:00
hlaaftana
3e060cfb0a
=> supports pragmas & names (+ changed behavior) ( #14200 )
...
* => supports pragmas & names (+ changed behavior)
(x, y: int) is now parsed as (x: int, y: int) instead of
(x: auto, y: int) inside => and ->.
* fix pragma check
* fixes, use since & LHS of -> supports pragmas
2020-05-03 10:22:49 +02:00
Araq
ff1c0bae4c
update tests that tested for the 'discard' error messages
2020-05-02 22:31:19 +02:00
zah
e50441ab33
Fix typeSym.getImpl for ref types ( #13752 )
...
* Fix typeSym.getImpl for ref types
* Fix a codegen issue affecting the test suite of nim-beacon-chain
* Fix tests/stdlib/tjsonmacro
To understand the fix better it may help to take a look
at the history of the replaced code.
The nil check that is removed in this commit was introduced
in another fix that failed to identify the root cause of the
issue - namely that we allow an object type to exist for which
no ast is present:
https://github.com/nim-lang/Nim/pull/9601/files
The original intention of the code is more obvious here:
https://github.com/nim-lang/Nim/pull/9538/files
2020-03-26 09:26:19 +01:00
Miran
5b55aa52d0
fix deprecations and other warnings ( #13748 )
2020-03-25 19:15:34 +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
Timothee Cour
eec07b4e84
fix several bugs with repr ( #13386 )
2020-02-11 21:33:06 +01:00
Arne Döring
b0c06aa711
fix #12740 ( #12774 )
...
* fix #12740
* A different kind of a hack
* proper fix
* fix typo
2019-12-04 07:33:01 +00:00
Arne Döring
03fa9a9041
fix regression in align ( #12680 )
...
* fix regression in align
* add test typesym without type
2019-11-19 09:58:47 +01:00
Arne Döring
94675c2378
backtick and export marker handling in eqIdent ( #12574 )
2019-11-07 14:40:44 +01:00
narimiran
c6a451c584
remove unused imports from tests
2019-11-06 14:35:45 +01:00
Andreas Rumpf
3ba3307d61
remove deprecated procs ( #12535 )
2019-11-05 11:05:46 +01:00
zah
a4ade43536
macros.newLit now works for ref object types ( #12307 )
2019-09-30 22:24:57 +02:00
Federico Ceratto
39290cf88c
Fix spellings ( #12277 ) [backport]
2019-09-27 07:02:54 +02:00
Jasper Jenkins
40c5175145
fix range.getType crash
2019-09-05 15:56:44 -07:00
nc-x
d5840e1e3d
Implement isExported for symbols in macros ( #11963 )
...
* Implement isExported for macros
* Reimplement isExported using VM callback mechanism
* VM does not support exceptions, use stacktrace() instead.
2019-08-18 11:51:28 +02:00
Arne Döring
44e7a7b6c2
Lock semchecked ast for macros ( #11883 ) [bugfix]
...
* reject to modify type checked AST
* add flag to back out
* Introduce legacy feature set.
2019-08-08 16:57:06 +02:00
cooldome
d1f6c820dd
Fixes #11662 : render ops priority ( #11664 )
2019-07-05 21:25:36 +02:00
Arne Döring
99a4fed96b
fix for passing tuples as static params to macros ( #11423 ); fixes #10751 [bugfix]
...
* add vm value preparation proc
* small optimization
2019-06-07 14:34:59 +02:00
andri lim
c16a753822
fix macrocache implementation ( #11404 )
...
* macrocache improvements
* fix macrocache implementation
2019-06-05 14:56:45 +02:00
Arne Döring
efbf43d4a9
intVal works now on enum field symbols ( #11403 )
...
* intVal works now on enum field symbols
* disable flakey titerators test
2019-06-05 14:55:47 +02:00
Araq
5f4e8dc4c9
added a nice test case for macro based lookup tables
2019-06-04 11:16:30 +02:00
narimiran
4606a00d4e
close #8573 by adding a test
2019-05-30 11:13:29 +02:00