mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
[if vfmt] function attribute for skipping functions for performance
This commit is contained in:
@@ -3872,7 +3872,13 @@ fn (p mut Parser) js_decode() string {
|
||||
|
||||
fn (p mut Parser) attribute() {
|
||||
p.check(.lsbr)
|
||||
p.attr = p.check_name()
|
||||
if p.tok == .key_if {
|
||||
// [if vfmt]
|
||||
p.next()
|
||||
p.attr = 'if ' + p.check_name()
|
||||
} else {
|
||||
p.attr = p.check_name()
|
||||
}
|
||||
attr_token_idx := p.cur_tok_index()
|
||||
if p.tok == .colon {
|
||||
p.check(.colon)
|
||||
|
||||
Reference in New Issue
Block a user