Skip to content

Commit 4ee4929

Browse files
sjrdWojciechMazur
authored andcommitted
Spec: Update the list of tokens that can start/end statements.
[Cherry-picked 500ef4d]
1 parent 6cda0e8 commit 4ee4929

File tree

1 file changed

+6
-7
lines changed

1 file changed

+6
-7
lines changed

Diff for: docs/_spec/01-lexical-syntax.md

+6-7
Original file line numberDiff line numberDiff line change
@@ -170,20 +170,19 @@ A newline in a Scala source text is treated as the special token “nl” if the
170170
The tokens that can terminate a statement are: literals, identifiers and the following delimiters and reserved words:
171171

172172
```
173-
this null true false return type <xml-start>
174-
_ ) ] }
173+
this null true false return type given <xml-start>
174+
_ ) ] } outdent
175175
```
176176

177177
The tokens that can begin a statement are all Scala tokens _except_ the following delimiters and reserved words:
178178

179179
```
180-
catch else extends finally forSome match with yield
181-
, . ; : = => <- <: <% >: # [ ) ] }
180+
catch do else extends finally forSome macro
181+
match then with yield
182+
, . ; : = => <- <: <% >: # =>> ?=>
183+
) ] } outdent
182184
```
183185

184-
A `case` token can begin a statement only if followed by a
185-
`class` or `object` token.
186-
187186
A _leading infix operator_ is a symbolic identifier such as `+`, or `approx_==`, or an identifier in backticks that:
188187

189188
- starts a new line, and

0 commit comments

Comments
 (0)