parent
ed12a5c84c
commit
d407a6449d
|
@ -663,6 +663,9 @@ pub fn (mut p Parser) top_stmt() ast.Stmt {
|
|||
return p.struct_decl()
|
||||
}
|
||||
.dollar {
|
||||
if p.peek_tok.kind == .eof {
|
||||
return p.error('unexpected eof')
|
||||
}
|
||||
if_expr := p.if_expr(true)
|
||||
return ast.ExprStmt{
|
||||
expr: if_expr
|
||||
|
|
|
@ -0,0 +1,3 @@
|
|||
vlib/v/parser/tests/dollar_err.vv:1:1: error: unexpected eof, expecting `if`
|
||||
1 | $
|
||||
| ^
|
|
@ -0,0 +1 @@
|
|||
$
|
Loading…
Reference in New Issue