diff options
author | Araq <rumpf_a@web.de> | 2020-06-19 09:51:25 +0200 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2020-06-19 15:02:38 +0200 |
commit | 65c7884a3c84d7e1750cf630940b089ed204bc1a (patch) | |
tree | 9466a62612bd8db1dfe36e991fb90fd67ed00e6c /lib | |
parent | 45d1e55e72aea9acfcf1a6fb7061779a243d7921 (diff) | |
download | Nim-65c7884a3c84d7e1750cf630940b089ed204bc1a.tar.gz |
fixes #14718 [backport]
Diffstat (limited to 'lib')
-rw-r--r-- | lib/pure/pegs.nim | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/pure/pegs.nim b/lib/pure/pegs.nim index 4f723b4af..946891420 100644 --- a/lib/pure/pegs.nim +++ b/lib/pure/pegs.nim @@ -907,16 +907,16 @@ macro mkHandlerTplts(handlers: untyped): untyped = result = newStmtList() for topCall in handlers[0]: - if nnkCall != topCall.kind: + if topCall.kind notin nnkCallKinds: error("Call syntax expected.", topCall) let pegKind = topCall[0] - if nnkIdent != pegKind.kind: + if pegKind.kind notin {nnkIdent, nnkSym}: error("PegKind expected.", pegKind) if 2 == topCall.len: for hdDef in topCall[1]: - if nnkCall != hdDef.kind: + if hdDef.kind notin nnkCallKinds: error("Call syntax expected.", hdDef) - if nnkIdent != hdDef[0].kind: + if hdDef[0].kind notin {nnkIdent, nnkSym}: error("Handler identifier expected.", hdDef[0]) if 2 == hdDef.len: let hdPostf = substr(pegKind.strVal, 2) |