Skip to content

Commit 2e2a55e

Browse files
smartersjrd
authored andcommitted
Context-free syntax refers to the weird optional brace meta-syntax
Copied from 01-lexical-syntax.md
1 parent 410ee0a commit 2e2a55e

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

docs/_spec/13-syntax-summary.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -87,6 +87,16 @@ nl ::= ´\mathit{“new line character”}´
8787
semi ::= ‘;’ | nl {nl}
8888
```
8989

90+
## Optional Braces
91+
92+
```
93+
colon ::= ':' -- with side conditions explained in 01-literal-syntax.md
94+
<<< ts >>> ::= ‘{’ ts ‘}’
95+
| indent ts outdent
96+
:<<< ts >>> ::= [nl] ‘{’ ts ‘}’
97+
| colon indent ts outdent
98+
```
99+
90100
## Context-free Syntax
91101

92102
´\color{red}{\text{TODO SCALA3: Once we're done porting the spec, make sure that

0 commit comments

Comments
 (0)