Remove expr/stmt (#5857)

This commit is contained in:
Arne Döring 2017-07-25 09:28:23 +02:00 • committed by Andreas Rumpf
commit 000b8afd26
168 changed files with 497 additions and 529 deletions

View file

@ -70,12 +70,12 @@ proc parse_component(body: NimNode): Component =
result.procs_index.add(procdef.identifier.name)
else: discard
macro component*(name: expr, body: stmt): stmt {.immediate.} =
macro component*(name, body: untyped): typed =
let component = parse_component(body)
registry.addComponent($name, component)
parseStmt("discard")
macro component_builtins(body: stmt): stmt {.immediate.} =
macro component_builtins(body: untyped): typed =
let builtin = parse_component(body)
registry.field_index = builtin.field_index
registry.procs_index = builtin.procs_index
@ -88,7 +88,7 @@ proc bind_methods*(component: var Component, identifier: Ident): seq[NimNode] =
procdef.params.insert(this_field, 0)
result.add(procdef.render())
macro bind_components*(type_name, component_names: expr): stmt {.immediate.} =
macro bind_components*(type_name, component_names: untyped): typed =
result = newStmtList()
let identifier = newIdent(type_name)
let components = newBracket(component_names)