npc

nanohard parser compiler
git clone git://git.kocotian.pl/npc.git
Log | Files | Refs

commit cbb2e165dd814c866b583010a0e8f3d4b080d4cd
parent 93f3c7a129c6f437a119b66d30303bf3231ccc92
Author: kocotian <kocotian@kocotian.pl>
Date:   Mon, 12 Apr 2021 19:29:16 +0200

Definition Types and Booleans in npc syntax; comma before next

Diffstat:
Mnpc.npc | 17+++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/npc.npc b/npc.npc @@ -18,11 +18,24 @@ define token Number define token Identifier match (charBetween('a', 'z') or charBetween('A', 'Z')) then until true - (charBetween('a', 'z') or charBetween('A', 'Z') or charBetween('0', '9')) + (charBetween('a', 'z') or charBetween('A', 'Z') or charBetween('0', '9')), next { define token Keyword match ( - compare("define") + compare("define") or + + compare("match") or + compare("next") + ); + define token DefinitionType + match ( + compare("token") or + compare("function") + ); + define token Boolean + match ( + compare("true") or + compare("false") ); };