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

@ -105,10 +105,10 @@ proc pat2kind(pattern: string): FormulaKind =
import macros
proc matchAgainst(n, pattern: NimNode): NimNode {.compileTime.} =
template `@`(current, field: expr): expr =
template `@`(current, field: untyped): untyped =
newDotExpr(current, newIdentNode(astToStr(field)))
template `==@`(n, pattern: expr): expr =
template `==@`(n, pattern: untyped): untyped =
newCall("==", n@kind, newIdentNode($pat2kind($pattern.ident)))
case pattern.kind
@ -126,7 +126,7 @@ proc matchAgainst(n, pattern: NimNode): NimNode {.compileTime.} =
else:
error "invalid pattern"
macro `=~` (n: Formula, pattern: expr): bool =
macro `=~` (n: Formula, pattern: untyped): bool =
result = matchAgainst(n, pattern)
proc isPolyTerm2(n: Formula): bool = n =~ c * x^c