summary refs log tree commit diff stats
path: root/tests/macros
Commit message (Collapse)AuthorAgeFilesLines
* fix NimNode comment repr() regression [backport: 1.2] (#19726)flywind2022-04-251-0/+19
|
* Allow std/macros.params to work with nnkProcTy (#19563)Tanguy2022-02-251-0/+22
| | | | | * Allow std/macros.params to work with nnkProcTy * Add tests for proc params & pragma
* [testcase] genSym fails to make unique identifier for ref object types (#19506)flywind2022-02-141-0/+60
| | | close #15118
* accept object type node from macros (#19179)hlaaftana2021-11-241-0/+16
|
* parseExpr/parseStmt accept filename, fixes #13540 (#19182)hlaaftana2021-11-242-0/+15
|
* `caseStmtMacros` no longer experimental, experimental manual refactor (#19173)hlaaftana2021-11-231-2/+0
| | | | | | | | | | | * `caseStmtMacros` no longer experimental, experimental manual refactor * Update doc/manual.rst * apply review suggestions * apply review Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* fixes #14511 [backport:1.4] (#18732)Dankr4d2021-08-251-0/+54
| | | | | | | | | | | | | | | | | | | | | | | | | * fixes #14511 [backport:1.4] Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced fix with code from alaviss, for better readability, with small changes. Signed-off-by: Dankr4d <dude569@freenet.de> * - Specified output in test. Signed-off-by: Dankr4d <dude569@freenet.de> * Replaced case in nnkRecCase with a simpler version, which just adds the last son. Signed-off-by: Dankr4d <dude569@freenet.de> * Update tests/macros/t14511.nim * Update tests/macros/t14511.nim Co-authored-by: Andreas Rumpf <rumpf_a@web.de>
* Fix doubly typed forward declarations (#18279)Clyybber2021-06-161-1/+21
| | | | | | | | | * Add testcase * Fix testcase * Fix doubly typed forward decls * Better fix
* Don't report unused hints for consumed AST (#18270)Clyybber2021-06-161-0/+15
| | | | | | | | | * Fix #18203 * Add testcase * Fix testcase * Fix test
* fixes #18235 - proc annotation type macro sym leak (#18249)Saem Ghani2021-06-142-0/+60
| | | | | | | | | | | | | | | | | | | | | * fixes #18235 - proc annotation type macro sym leak - also fixed a typo - proc annotations guard symbol exports with shadow scopes - symbol handling is shadow scope aware * test for exporting an existing unexported sym this one is for my homie alaviss. * Special handling not needed in semProcAnnotation * Testcasing * [skip ci] clean-up and add some more comments * [skip ci] rm trailing whitespace Co-authored-by: Clyybber <darkmine956@gmail.com>
* getType now works with tyInferred (arising from concepts); refs #18220 (#18241)Timothee Cour2021-06-121-22/+78
| | | | | | | * getType now works with tyInferred (concepts); refs #18220 * avoid cast * add more docs
* macros.treeRepr + friends: collapse SymChoice (#18072)Timothee Cour2021-06-051-28/+108
| | | | | | | * macros.treeRepr + friends: collapse SymChoice * make repr+friends work with invalid symchoice nodes * address comment
* Fixes #5034 illformed AST from getImpl with proc returning value (#17976)Dylan Modesitt2021-05-311-0/+31
| | | | | * Fixes 5034 * address comments
* fix #17836 (typed macro isNil for proc params) (#17841)Saem Ghani2021-04-251-0/+15
| | | thanks @alaviss for the test
* close #7875 add testcase (#17611)flywind2021-04-021-0/+22
| | | | | * close #7875 add testcase * fix
* unify tuple expressions (#13793)Arne Döring2021-03-301-0/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * unify tuple expressions * fix test * fix test * apply feedback * Handle empty tuples * Fix rendering named unary tuple * Protect static NimNode against stripping * Slightly less hacky * Revert "Slightly less hacky" This reverts commit 170c5aec0addc029f637afbc948700ca006b7942. * Slightly less hacky * Cleanup * Fix test * Fix another test * Add condsym * Rebase fallout * changelog: Move from compiler changes to language changes * Add stricter tests * Add empty tuple example to doc/astspec * Fix test Co-authored-by: Clyybber <darkmine956@gmail.com>
* nnkArglist => nnkArgList + special case stylecheck:error (#17529)Timothee Cour2021-03-271-1/+1
| | | | | * nnkArglist => nnkArgList * special case stylecheck:error
* Remove support for named procs with sugar.=> (#17220)konsumlamm2021-03-051-8/+2
| | | | | | * Add docs & tests for named procs with sugar.=> * Remove support for named procs in sugar.=> * Resolve conflict * Fix test
* rename case statement macro from match to `case` (#16923)hlaaftana2021-02-081-0/+35
| | | | | * rename case statement macro from match to `case` * fix test
* fix broken => for typed procs with pragmas (#16190)hlaaftana2020-12-011-0/+13
| | | | | | | * fix broken => for typed procs with pragmas * add more sugar tests * add ending quote
* make megatest consistent with unjoined tests wrt newlines, honor newlines in ↵Timothee Cour2020-11-281-0/+1
| | | | | | | output spec (#16151) * fix megatest newlines * still allow missing trailing newline for now but in a more strict way than before
* More on #16110 (#16130)cooldome2020-11-261-6/+21
| | | | | | | | | | | * fix #16110 * refs #16110 * fix comment * Trigger build * use shallowCopy for efficiency
* fix #14339, #13511, #14420: fixes limited VM support for addr (#16002)Timothee Cour2020-11-251-0/+25
| | | | | | | | | | | * fix #14339: fixes limited VM support for addr * strengthen test * reference bug #16003 * also fixes #13511 * also fixes #14420
* fix #16110 (#16117)cooldome2020-11-241-0/+18
|
* Revert "fix #16110"Andrey R (cooldome)2020-11-241-19/+0
| | | | This reverts commit f8b9d8c1904c662f07e5ee1138357695a1df9ac3.
* fix #16110Andrey R (cooldome)2020-11-241-0/+19
|
* close #14847(add testcase for #14847) (#16045)flywind2020-11-191-0/+20
|
* add testcase for #14227 (#15794)flywind2020-10-301-0/+23
|
* implements https://github.com/nim-lang/RFCs/issues/258 (#15503)Andreas Rumpf2020-10-061-2/+9
| | | | | | | | | * 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
* renderer: use the biggest integer type for masking literals (#15482)alaviss2020-10-041-0/+2
| | | | | | | | 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.
* Added std/effecttraits.nim (#15462)Andreas Rumpf2020-10-021-0/+22
|
* Fix #15389 (#15390)cooldome2020-09-241-0/+17
| | | | | | | | | * allow result symbol reuse * try different approach * Revert "try different approach" This reverts commit abcfb6b75983c2f798cc887342ff1a9ff10c0324.
* Fix forward declarations in shadow scope contexts (#15386)Clyybber2020-09-221-0/+77
| | | | | | | | | | | | | | | * 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
* fix #15326 (#15341)cooldome2020-09-161-0/+8
|
* proc params as syms (#15332)cooldome2020-09-161-0/+8
| | | | | | | | | | | | | | | | | * 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>
* "for-loop macros" are no longer an experimental feature (#15288)Miran2020-09-081-1/+1
|
* Fix #5691 (#15158)Clyybber2020-08-272-0/+17
| | | | | | | | * Fix #5691 * Cleanup and thoughts * Use scope approach * Seperate defined/declared/declaredInScope magics * Fix declaredInScope * Update spec accordingly
* Fix forward declaration issues in template/macro context (#15091)Clyybber2020-07-291-0/+114
| | | | | | | | | | | | | | | | | | | | | | | * 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
* enable,document,test getImplTransformed, very useful for understanding how ↵Timothee Cour2020-07-181-0/+20
| | | | | | nim transforms code (#14924) * enable,document,test getImplTransformed, very useful for understanding how nim transforms code
* Closes #13253Clyybber2020-07-141-0/+31
|
* Clean up macros (#14959)Juan Carlos2020-07-141-3/+0
|
* Add testcase for #12129 (#14940)Clyybber2020-07-081-0/+14
| | | | | * Add testcase for #12129 * Fix test
* add legacy workaround; improve test so that it actually tests for the bugfixTimothee Cour2020-06-191-31/+7
|
* Update tuple newLitsolo9892020-06-191-0/+32
|
* Implement rendering of `[]=`, `{}`, `{}=` braces (#14539)cooldome2020-06-011-1/+14
| | | | | | | * render curly braces * fix typo * fix test Co-authored-by: cooldome <ariabushenko@bk.ru>
* => supports pragmas & names (+ changed behavior) (#14200)hlaaftana2020-05-031-16/+15
| | | | | | | | | | * => 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
* update tests that tested for the 'discard' error messagesAraq2020-05-021-8/+8
|
* Fix typeSym.getImpl for ref types (#13752)zah2020-03-261-2/+82
| | | | | | | | | | | | | | | | | | | | | * 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
* fix deprecations and other warnings (#13748)Miran2020-03-251-4/+4
|
* add expectIdent to macros (#12778)Arne Döring2020-03-112-0/+42
| | | | | | | | | | | | | | | | * 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>