mirror of
https://github.com/vlang/v.git
synced 2025-09-14 06:52:36 +03:00
parser: allow as
in consts
This commit is contained in:
parent
9034b1fd08
commit
c8dcbcb649
1 changed files with 5 additions and 0 deletions
|
@ -692,6 +692,11 @@ fn (p mut Parser) expression() string {
|
|||
}
|
||||
}
|
||||
}
|
||||
// `as` cast
|
||||
// TODO remove copypasta
|
||||
if p.tok == .key_as {
|
||||
return p.key_as(typ, ph)
|
||||
}
|
||||
return typ
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue