1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

compiler: allow to declare C function with pointers with &

This commit is contained in:
Henrixounez 2019-09-06 14:13:38 +02:00 committed by Alexander Medvednikov
parent 8ac0a2b2dd
commit bfdab586e3

View File

@ -686,7 +686,7 @@ fn (p mut Parser) fn_args(f mut Fn) {
}
// `(int, string, int)`
// Just register fn arg types
types_only := p.tok == .mul || (p.peek() == .comma && p.table.known_type(p.lit)) || p.peek() == .rpar// (int, string)
types_only := p.tok == .mul || p.tok == .amp || (p.peek() == .comma && p.table.known_type(p.lit)) || p.peek() == .rpar// (int, string)
if types_only {
for p.tok != .rpar {
typ := p.get_type()