aboutsummaryrefslogtreecommitdiff
path: root/syntax.md
diff options
context:
space:
mode:
authorMelody Horn <melody@boringcactus.com>2020-10-28 22:17:02 -0600
committerMelody Horn <melody@boringcactus.com>2020-10-28 22:17:02 -0600
commite558d912a7e3583d700aa42261ef1fa17e5d0d55 (patch)
tree158a6572c24f09df957491e98e8c159fcc163ecc /syntax.md
parentcd6f0a93c69c622bfa8ca5f888da52e734903455 (diff)
downloadspec-e558d912a7e3583d700aa42261ef1fa17e5d0d55.tar.gz
spec-e558d912a7e3583d700aa42261ef1fa17e5d0d55.zip
syntax highlight Crowbar code
Diffstat (limited to 'syntax.md')
-rw-r--r--syntax.md10
1 files changed, 5 insertions, 5 deletions
diff --git a/syntax.md b/syntax.md
index 9320b1c..be62b47 100644
--- a/syntax.md
+++ b/syntax.md
@@ -176,7 +176,7 @@ The syntax of Crowbar is given as a [parsing expression grammar](https://en.wiki
### Entry points
-```
+```PEG
HeaderFile ← HeaderFileElement+
HeaderFileElement ← IncludeStatement /
TypeDeclaration /
@@ -189,7 +189,7 @@ ImplementationFileElement ← HeaderFileElement /
### Top-level elements
-```
+```PEG
IncludeStatement ← 'include' string-literal ';'
TypeDeclaration ← StructDeclaration /
@@ -208,7 +208,7 @@ SignatureArguments ← Type identifier ',' SignatureArguments /
### Statements
-```
+```PEG
Block ← '{' Statement* '}'
Statement ← VariableDefinition /
@@ -260,7 +260,7 @@ ExpressionStatement ← Expression ';'
### Types
-```
+```PEG
Type ← 'const' BasicType /
BasicType '*' /
BasicType '[' Expression ']' /
@@ -285,7 +285,7 @@ IntegerType ← 'char' /
### Expressions
-```
+```PEG
AssignmentTargetExpression ← identifier ATEElementSuffix*
ATEElementSuffix ← '[' Expression ']' /
'.' identifier /