mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: support dot prefix for attributes (#12744)
This commit is contained in:
parent
36fbd3c4fa
commit
6d14275106
@ -1587,6 +1587,12 @@ fn (mut p Parser) parse_attr() ast.Attr {
|
||||
p.next()
|
||||
} else {
|
||||
name = p.check_name()
|
||||
// support dot prefix `module.name: arg`
|
||||
if p.tok.kind == .dot {
|
||||
p.next()
|
||||
name += '.'
|
||||
name += p.check_name()
|
||||
}
|
||||
if p.tok.kind == .colon {
|
||||
has_arg = true
|
||||
p.next()
|
||||
|
Loading…
Reference in New Issue
Block a user