aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-10-14 17:09:08 -0600
committerMelody Horn <melody@boringcactus.com>2020-10-14 17:09:08 -0600
commitf88a1eaa4a7e9016531b76a9f6e5b82a44f1111e (patch)
tree3ba15c29a34ce6750cad26c4f5558ac015ebc9b2
parent991911675b6265161a37d6257f893090370805f3 (diff)
downloadspec-f88a1eaa4a7e9016531b76a9f6e5b82a44f1111e.tar.gz
spec-f88a1eaa4a7e9016531b76a9f6e5b82a44f1111e.zip
alow enum constants
-rw-r--r--syntax.md4
1 files changed, 2 insertions, 2 deletions
diff --git a/syntax.md b/syntax.md
index c7e0e0e..6b94b8b 100644
--- a/syntax.md
+++ b/syntax.md
@@ -187,8 +187,8 @@ TypeDeclaration ← StructDeclaration /
TypedefDeclaration
StructDeclaration ← 'struct' identifier '{' VariableDeclaration+ '}' ';'
EnumDeclaration ← 'enum' identifier '{' EnumBody '}' ';'
-EnumBody ← identifier ',' EnumBody /
- identifier ','?
+EnumBody ← identifier ('=' Expression)? ',' EnumBody /
+ identifier ('=' Expression)? ','?
TypedefDeclaration ← 'typedef' identifier '=' Type ';'
FunctionDeclaration ← FunctionSignature ';'