summary refs log tree commit diff stats
path: root/compiler
diff options
context:
space:
mode:
Diffstat (limited to 'compiler')
-rw-r--r--compiler/patterns.nim2
-rwxr-xr-xcompiler/semtempl.nim2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/patterns.nim b/compiler/patterns.nim
index d8c7e26d9..af259c916 100644
--- a/compiler/patterns.nim
+++ b/compiler/patterns.nim
@@ -146,7 +146,7 @@ proc matches(c: PPatternContext, p, n: PNode): bool =
     case opr
     of "|": result = matchChoice(c, p, n)
     of "*": result = matchNested(c, p, n, rpn=false)
-    of "*|": result = matchNested(c, p, n, rpn=true)
+    of "**": result = matchNested(c, p, n, rpn=true)
     of "~": result = not matches(c, p.sons[1], n)
     else: InternalError(p.info, "invalid pattern")
     # template {add(a, `&` * b)}(a: string{noalias}, b: varargs[string]) = 
diff --git a/compiler/semtempl.nim b/compiler/semtempl.nim
index ef935e346..8e36aac20 100755
--- a/compiler/semtempl.nim
+++ b/compiler/semtempl.nim
@@ -491,7 +491,7 @@ proc semPatternBody(c: var TemplCtx, n: PNode): PNode =
       # we interpret `*` and `|` only as pattern operators if they occur in
       # infix notation, so that '`*`(a, b)' can be used for verbatim matching:
       let opr = n.sons[0]
-      if opr.ident.s == "*" or opr.ident.s == "*|":
+      if opr.ident.s == "*" or opr.ident.s == "**":
         result = newNodeI(nkPattern, n.info, n.len)
         result.sons[0] = opr
         result.sons[1] = semPatternBody(c, n.sons[1])