mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: parse type - fix multiple &
This commit is contained in:
@@ -94,9 +94,14 @@ pub fn (p mut Parser) parse_type() table.Type {
|
||||
}
|
||||
// &Type
|
||||
mut nr_muls := 0
|
||||
for p.tok.kind == .amp {
|
||||
p.check(.amp)
|
||||
nr_muls++
|
||||
for p.tok.kind in [.and, .amp] {
|
||||
if p.tok.kind == .and {
|
||||
nr_muls+=2
|
||||
}
|
||||
else {
|
||||
nr_muls++
|
||||
}
|
||||
p.next()
|
||||
}
|
||||
if p.tok.kind == .key_mut {
|
||||
nr_muls++
|
||||
|
||||
Reference in New Issue
Block a user