diff options
Diffstat (limited to 'src/parse.cff')
| -rw-r--r-- | src/parse.cff | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/parse.cff b/src/parse.cff index aad88d1..dbc8e29 100644 --- a/src/parse.cff +++ b/src/parse.cff @@ -3014,7 +3014,11 @@ fn parsedecls(P *Parser, loc Loc, yield DeclYielder, yarg *void, toplevel bool) } } + switch { + case lexmatch(P, &tok, ';') or lexmatch(P, &tok, :eof); + // no-op + case lexmatch(P, &tok, :kw_fn); let name = lexmatch(P, &tok, :ident) ? tok.u.ident : #null; decl = parsefn(P, tok.loc, toplevel, externp, name); |