mirror of
https://github.com/nim-lang/Nim.git
synced 2026-04-30 11:13:57 +00:00
next steps towards term rewriting macros; simple examples work
This commit is contained in:
@@ -46,7 +46,7 @@ type
|
||||
nnkYieldStmt, nnkTryStmt, nnkFinally, nnkRaiseStmt,
|
||||
nnkReturnStmt, nnkBreakStmt, nnkContinueStmt, nnkBlockStmt, nnkStaticStmt,
|
||||
nnkDiscardStmt, nnkStmtList, nnkImportStmt, nnkFromStmt,
|
||||
nnkIncludeStmt, nnkBindStmt, nnkPatternStmt,
|
||||
nnkIncludeStmt, nnkBindStmt, nnkPattern,
|
||||
nnkCommentStmt, nnkStmtListExpr, nnkBlockExpr,
|
||||
nnkStmtListType, nnkBlockType, nnkTypeOfExpr, nnkObjectTy,
|
||||
nnkTupleTy, nnkRecList, nnkRecCase, nnkRecWhen,
|
||||
|
||||
@@ -92,7 +92,9 @@ template fail* =
|
||||
TestStatusIMPL = FAILED
|
||||
checkpoints = @[]
|
||||
|
||||
macro check*(conditions: stmt): stmt =
|
||||
macro check*(conditions: stmt): stmt =
|
||||
let conditions = callsite()
|
||||
|
||||
proc standardRewrite(e: PNimrodNode): PNimrodNode =
|
||||
template rewrite(Exp, lineInfoLit: expr, expLit: string): stmt =
|
||||
if not Exp:
|
||||
|
||||
Reference in New Issue
Block a user