Skip to content

Commit 3c628d2

Browse files
committedNov 28, 2024
handle BooleanRule in GrammarExtensions.ToDefinition()
so we don't just print "_UNKNOWN_".
1 parent b671910 commit 3c628d2

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed
 

‎Parakeet/GrammarExtensions.cs

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
using System;
1+
using System;
22
using System.Collections.Generic;
33
using System.Linq;
44

@@ -86,6 +86,8 @@ public static string ToDefinition(this Rule r, bool shortForm = true, string ind
8686
return $"_END_";
8787
case CharRule ch:
8888
return $"'{ch.Char}'";
89+
case BooleanRule br:
90+
return br.Value ? "_TRUE_" : "_FALSE_";
8991
default:
9092
return "_UNKNOWN_";
9193
}

0 commit comments

Comments
 (0)
Please sign in to comment.