diff options
author | Melody Horn <melody@boringcactus.com> | 2020-10-28 22:17:02 -0600 |
---|---|---|
committer | Melody Horn <melody@boringcactus.com> | 2020-10-28 22:17:02 -0600 |
commit | e558d912a7e3583d700aa42261ef1fa17e5d0d55 (patch) | |
tree | 158a6572c24f09df957491e98e8c159fcc163ecc /syntax.md | |
parent | cd6f0a93c69c622bfa8ca5f888da52e734903455 (diff) | |
download | spec-e558d912a7e3583d700aa42261ef1fa17e5d0d55.tar.gz spec-e558d912a7e3583d700aa42261ef1fa17e5d0d55.zip |
syntax highlight Crowbar code
Diffstat (limited to 'syntax.md')
-rw-r--r-- | syntax.md | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 / |