We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ed12a5c commit d407a64Copy full SHA for d407a64
vlib/v/parser/parser.v
@@ -663,6 +663,9 @@ pub fn (mut p Parser) top_stmt() ast.Stmt {
663
return p.struct_decl()
664
}
665
.dollar {
666
+ if p.peek_tok.kind == .eof {
667
+ return p.error('unexpected eof')
668
+ }
669
if_expr := p.if_expr(true)
670
return ast.ExprStmt{
671
expr: if_expr
vlib/v/parser/tests/dollar_err.out
@@ -0,0 +1,3 @@
1
+vlib/v/parser/tests/dollar_err.vv:1:1: error: unexpected eof, expecting `if`
2
+ 1 | $
3
+ | ^
vlib/v/parser/tests/dollar_err.vv
@@ -0,0 +1 @@
+$
0 commit comments