parser: fix `(x mut &X)`
parent
c6cf8ace22
commit
91ffeeb73b
|
@ -93,8 +93,12 @@ pub fn (p mut Parser) parse_type() table.Type {
|
|||
p.next()
|
||||
is_optional = true
|
||||
}
|
||||
// &Type
|
||||
mut nr_muls := 0
|
||||
if p.tok.kind == .key_mut {
|
||||
nr_muls++
|
||||
p.next()
|
||||
}
|
||||
// &Type
|
||||
for p.tok.kind in [.and, .amp] {
|
||||
if p.tok.kind == .and {
|
||||
nr_muls += 2
|
||||
|
@ -104,10 +108,6 @@ pub fn (p mut Parser) parse_type() table.Type {
|
|||
}
|
||||
p.next()
|
||||
}
|
||||
if p.tok.kind == .key_mut {
|
||||
nr_muls++
|
||||
p.next()
|
||||
}
|
||||
is_c := p.tok.lit == 'C'
|
||||
if is_c {
|
||||
p.next()
|
||||
|
|
Loading…
Reference in New Issue