mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
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
|
||||
|
3
vlib/v/parser/tests/dollar_err.out
Normal file
3
vlib/v/parser/tests/dollar_err.out
Normal file
@ -0,0 +1,3 @@
|
||||
vlib/v/parser/tests/dollar_err.vv:1:1: error: unexpected eof, expecting `if`
|
||||
1 | $
|
||||
| ^
|
1
vlib/v/parser/tests/dollar_err.vv
Normal file
1
vlib/v/parser/tests/dollar_err.vv
Normal file
@ -0,0 +1 @@
|
||||
$
|
Loading…
Reference in New Issue
Block a user