From 9d83e5425d89ee85ece51b7014f478d4b8b9da67 Mon Sep 17 00:00:00 2001 From: nitrix Date: Fri, 14 Feb 2020 14:10:23 +0100 Subject: [PATCH] add a null literal --- src/main/antlr4/de/hsrm/compiler/Klang/Klang.g4 | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/antlr4/de/hsrm/compiler/Klang/Klang.g4 b/src/main/antlr4/de/hsrm/compiler/Klang/Klang.g4 index 8ce46f9..5c0544e 100644 --- a/src/main/antlr4/de/hsrm/compiler/Klang/Klang.g4 +++ b/src/main/antlr4/de/hsrm/compiler/Klang/Klang.g4 @@ -98,6 +98,7 @@ atom : INTEGER_LITERAL #intAtom | BOOLEAN_LITERAL #boolAtom | FLOAT_LITERAL #floatAtom + | NULL # nullAtom | IDENT #variable ; @@ -145,6 +146,7 @@ WHILE: 'while'; DO: 'do'; FOR: 'for'; CREATE: 'create'; +NULL: 'naught'; PERIOD: '.'; COL: ':';