summary refs log tree commit diff stats
path: root/lib/nimhcr.nim
Commit message (Expand)AuthorAgeFilesLines
* make implicit cstring conversions explicit (#19488)ee72022-08-191-7/+7
* fixes #17647 (#17667)Andreas Rumpf2021-04-071-4/+4
* use single backtick (#17100)flywind2021-02-181-1/+1
* fix some warnings (#16952)flywind2021-02-081-2/+2
* styleCheck: Fix some inconsistent identifiers (#16177)ee72020-12-211-2/+2
* testament: generic N-fold batching: windows CI 37mn=>16m (#14823)Timothee Cour2020-06-271-0/+4
* hotfix: make 'nim doc nimhcr' work on all platformsAraq2020-03-231-33/+33
* style fix: change 'JS' to 'js' to make it consistent (#13168)Miran2020-01-161-2/+2
* fix several typos in documentation and comments (#12553)Nindaleth2019-10-301-2/+2
* [ci skip] Add note to nimhcr.nim (#12050)nc-x2019-08-261-0/+1
* - adding _actual as a suffix only for calls to an actual proc and not through...Viktor Kirilov2019-08-231-1/+1
* Fix HCR crash because certain procs were hcrGetProc'ed before being hcrRegist...nc-x2019-08-181-1/+1
* style improvements; fixes #11774Araq2019-07-191-3/+3
* improvements on the hot code reloading support (#10892)Viktor Kirilov2019-03-231-7/+14
* Don't include the nimhcr dev docs in the system module documentation (#10759)zah2019-03-081-180/+180
* Initial version of the hot-code reloading support for native targets (#10729)zah2019-02-261-0/+652
: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
discard """
output: '''
123
Hallo Welt
Hallo Welt
1
'''
"""

import macros

macro mac(): untyped =
  quote do:
    proc test(): int =
      (proc(): int = result = 123)()

mac()
echo test()

macro foobar(arg: untyped): untyped =
  result = arg
  result.add quote do:
    `result`

foobar:
  echo "Hallo Welt"

# bug #3744
import macros
macro t(): untyped =
  return quote do:
    proc tp(): int =
      result = 1
t()

echo tp()