From e558d912a7e3583d700aa42261ef1fa17e5d0d55 Mon Sep 17 00:00:00 2001 From: Melody Horn Date: Wed, 28 Oct 2020 22:17:02 -0600 Subject: syntax highlight Crowbar code --- syntax.md | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'syntax.md') 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 / -- cgit v1.2.3