mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
foo()? syntax
This commit is contained in:
@ -103,7 +103,9 @@ fn (p mut Parser) comp_time() {
|
||||
else_returns := p.returns
|
||||
p.returns = if_returns && else_returns
|
||||
//p.gen('/* returns $p.returns */')
|
||||
}
|
||||
} else if p.tok == .key_else {
|
||||
p.error('use `$' + 'else` instead of `else` in comptime if statements')
|
||||
}
|
||||
}
|
||||
else if p.tok == .key_for {
|
||||
p.next()
|
||||
@ -234,7 +236,7 @@ fn (p mut Parser) chash() {
|
||||
p.cgen.includes << '#$hash'
|
||||
}
|
||||
}
|
||||
// Don't parse a non-JS V file (`#-js` flag)
|
||||
//// Don't parse a non-JS V file (`#-js` flag)
|
||||
else if hash == '-js' {
|
||||
$if js {
|
||||
for p.tok != .eof {
|
||||
|
Reference in New Issue
Block a user