lazy paths for Babel support
This commit is contained in:
parent
a840a4ce53
commit
c98696d742
8 changed files with 57 additions and 23 deletions
|
|
@ -237,6 +237,15 @@ proc addToArgList(result, n: PNode) =
|
|||
else:
|
||||
for i in 0 .. <n.len: result.add(n.sons[i])
|
||||
|
||||
when false:
|
||||
proc procPatternMatches*(c: PContext, s: PSym, n: PNode): bool =
|
||||
## for AST-based overloading:
|
||||
var ctx: TPatternContext
|
||||
ctx.owner = s
|
||||
ctx.c = c
|
||||
ctx.formals = sonsLen(s.typ)-1
|
||||
result = matches(ctx, s.ast.sons[patternPos], n)
|
||||
|
||||
proc applyRule*(c: PContext, s: PSym, n: PNode): PNode =
|
||||
## returns a tree to semcheck if the rule triggered; nil otherwise
|
||||
var ctx: TPatternContext
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue