Skip to content

Commit

Permalink
Merge pull request #83 from loloicci/fix-82
Browse files Browse the repository at this point in the history
modify error message for assertion
  • Loading branch information
loloicci authored Mar 30, 2021
2 parents 28a8297 + cdfa21d commit b842cff
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 1 deletion.
2 changes: 1 addition & 1 deletion src/nimly/lexgen.nim
Original file line number Diff line number Diff line change
Expand Up @@ -816,7 +816,7 @@ proc convertToSeqRePart(re: string): seq[RePart] =
of 'd', 'D', 's', 'S', 'w', 'W':
result.add(Tree(classTable[c].convertToTree))
else:
doassert false, "Invalid escaping"
doassert false, "Invalid escaping \"\\" & c & "\" is in niml match pattern."
flag.excl(readingEscape)
else:
case c
Expand Down
9 changes: 9 additions & 0 deletions tests/ex.nim
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
import nimly
import patty

variant Token:
FOO

niml a[Token]:
r"\:":
return FOO()

0 comments on commit b842cff

Please sign in to comment.