mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: minor cleanup in parse_type.v (#14863)
This commit is contained in:
parent
2d40ba1f49
commit
044698746e
@ -150,8 +150,7 @@ pub fn (mut p Parser) parse_map_type() ast.Type {
|
||||
}
|
||||
|
||||
pub fn (mut p Parser) parse_chan_type() ast.Type {
|
||||
if p.peek_tok.kind != .name && p.peek_tok.kind != .key_mut && p.peek_tok.kind != .amp
|
||||
&& p.peek_tok.kind != .lsbr {
|
||||
if p.peek_tok.kind !in [.name, .key_mut, .amp, .lsbr] {
|
||||
p.next()
|
||||
return ast.chan_type
|
||||
}
|
||||
@ -171,8 +170,7 @@ pub fn (mut p Parser) parse_thread_type() ast.Type {
|
||||
if is_opt {
|
||||
p.next()
|
||||
}
|
||||
if p.peek_tok.kind != .name && p.peek_tok.kind != .key_mut && p.peek_tok.kind != .amp
|
||||
&& p.peek_tok.kind != .lsbr {
|
||||
if p.peek_tok.kind !in [.name, .key_mut, .amp, .lsbr] {
|
||||
p.next()
|
||||
if is_opt {
|
||||
mut ret_type := ast.void_type
|
||||
|
Loading…
Reference in New Issue
Block a user