From 47600fcc43aaf608af5aedd6a0b14942bae646a8 Mon Sep 17 00:00:00 2001 From: Ico Doornekamp Date: Tue, 3 Oct 2023 19:25:56 +0200 Subject: [PATCH] Added 'NPeg and generic functions' section to readme --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index 2d0a627..9a94f78 100644 --- a/README.md +++ b/README.md @@ -1446,6 +1446,19 @@ from EBNF to PEG. Notable differences are left recursion and ordered choice. Also, see "From EBNF to PEG" from Roman R. Redziejowski. +### NPeg and generic functions + +Nim's macro system is sometimes finicky and not well defined, and NPeg seems to +push it to the limit. This means that you might run into strange and +unexpected issues, especially when mixing NPeg with generic code. + +If you run into weird error messages that do not seem to make sense when using +NPeg from generic procs, check the links below for more information and +possible workarounds: + +- https://github.com/nim-lang/Nim/issues/22740 +- https://github.com/zevv/npeg/issues/68 + ## Examples