Remove expr/stmt (#5857)
This commit is contained in:
parent
52ff244d5d
commit
000b8afd26
168 changed files with 497 additions and 529 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue