mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
parser: handle operator methods and fix them in vdoc
This commit is contained in:
@@ -99,6 +99,10 @@ fn (p mut Parser) fn_decl() ast.FnDecl {
|
||||
// TODO high
|
||||
name = p.check_name()
|
||||
}
|
||||
if p.tok.kind in [.plus, .minus, .mul, .div, .mod] {
|
||||
name = p.tok.kind.str() // op_to_fn_name()
|
||||
p.next()
|
||||
}
|
||||
// <T>
|
||||
if p.tok.kind == .lt {
|
||||
p.next()
|
||||
|
||||
Reference in New Issue
Block a user