| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Fix result not being able to use in quote do
This fixes the annoying issue of not be able to use result inside a
quote do block. It works by a simple trick. The quote do mechanic is
based on dynamically creating a template and immediately calling it with
the arguments found within the quote do block. Since this is called in
the scope of the macro the result variable is shadowed. This trick works
by changing all occurences of result (which shouldn't cause any issues
as result isn't used for anything else for the same reason) to another
name and then passing in an IdentNode with result as a named parameter
with that name.
Note that currently this just replaces it with a fixed named variable
"res" which should be changed to a non-colliding, dynamically created
name.
* Fix hard coded parameter "res" to anonymous symbol
This fixes the hard coded parameter "res" to be an anonymous symbol
instead so it won't collide with other parts of the argument list.
* Add test case for result in quote do block
A simple test case based on GitHub issue #7323 on how you can't put
result in a quote do block. This test verifies that it actually works
correctly now.
* Add test for explicit capturing of result
* Rebased against devel
|
| |
|
|
|
|
|
| |
* change generic `tissues` name to more specific
* change `tvarious` to more specific names
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
gen (#8489)
* Ast no transformation
* Add getImplNoTransform to the macros module
* progress on delaying transf
* Fix methods tranformation
* Fix lazy lambdalifting
* fix create thread wrapper
* transform for lambda lifting
* improve getImplTransformed
* Fix destructor tests
* try to fix nimprof for linux
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
* Fix macro expansion in expandMacros
Running a semanticized node trough the semantic pass was a bad idea.
Fixes #7723
* Simpler smaller implementation
|
|
|
|
| |
Fixes #6448
Fixes #4384
|
|
|
|
|
|
| |
The `range[X,Y]` representation is wrong, we use `range[X .. Y]`
instead.
Fixes #9194
|
| |
|
|
|
|
|
|
| |
Fixes #8763: render bug: pure enums not handled correctly
Fixes #8762: render bug: binary operators called with quotes rendered incorrectly
FIxes #8761: render bug: inversion of operator priorities
|
| |
|
|
|
|
|
|
|
|
|
| |
When an empty nkArgList `varargs[untyped]` is passed around it is now
reused for efficiency sake and to prevent the introduction of a spurious
element: before this commit we'd pass the caller a
nkArgList[nkHiddenStdConv[nkBracket]] node instead of just an empty
nkArgList.
Fixes #8706
|
|
|
| |
Let's bring those to feature-parity with `error`.
|
|
|
|
|
|
| |
* fixes 8754
* improve test
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* bindSym power up, working prototype
* update bindSym doc
* add bindSym test
* fix some typo
* fix bindSym doc
* get rid of specialops field from vm
* add experimental: dynamicBindSym
|
|
|
|
| |
* Fixes #8348
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
| |
Return an error symbol if the macro output has no type and a typedesc
is expected.
Fixes #7454
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
The example is a proof-of-concept logging library, allowing you to define
lexically-scoped environments where certain logging attributes are applied
automatically to all logging statements.
fixes tmacro1 (use of `bindSym` inside static blocks)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This allows you to pass a template or a macro to another macro
which can then inspect the implementation of the former template/macro
using `getImpl`.
Since templates can be freely redefined, this allows you to treat
their symbols as compile-time variables that have lexical scope.
A motivating PoC example for a logging library taking advantage of
this will be provided in the next commit.
Implementation details:
* The name of a template or a macro will be consider a symbol if
the template/macro requires parameters
* For parameterless templates/macros, you can use `bindSym`, which
was extended to also work outside of compile-time procs.
|
| |
|
|
|
|
|
|
| |
* Strutils comment changes.
* fix typo
|
| |
|
| |
|
|
|
|
|
|
| |
* Added codeRepr and dumpCode to the macros module.
This allows those writing macros to write examples, get the code to generate the AST for that example, and then modify that code to be dynamic with the macro function.
|
| |
|
|
|
|
|
| |
* added test case for getTypeImpl
* modify getTypeImpl to reduce result to final implementation
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
| |
|
|
|
|
| |
* the type of the empty seq is still the correct type
* updated test
|
| |
|
| |
|
| |
|
|\ |
|