mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
vdoc: highlight variadic function parameters (#15474)
This commit is contained in:
parent
0645fe3322
commit
a1de8f5f98
@ -214,7 +214,7 @@ fn color_highlight(code string, tb &ast.Table) string {
|
|||||||
} else if
|
} else if
|
||||||
(next_tok.kind in [.lcbr, .rpar, .eof, .comma, .pipe, .name, .rcbr, .assign, .key_pub, .key_mut, .pipe, .comma, .comment]
|
(next_tok.kind in [.lcbr, .rpar, .eof, .comma, .pipe, .name, .rcbr, .assign, .key_pub, .key_mut, .pipe, .comma, .comment]
|
||||||
&& next_tok.lit !in builtin)
|
&& next_tok.lit !in builtin)
|
||||||
&& (prev.kind in [.name, .amp, .lcbr, .rsbr, .key_type, .assign, .dot, .question, .rpar, .key_struct, .key_enum, .pipe, .key_interface, .comment]
|
&& (prev.kind in [.name, .amp, .lcbr, .rsbr, .key_type, .assign, .dot, .question, .rpar, .key_struct, .key_enum, .pipe, .key_interface, .comment, .ellipsis]
|
||||||
&& prev.lit !in builtin) && ((tok.lit != '' && tok.lit[0].is_capital())
|
&& prev.lit !in builtin) && ((tok.lit != '' && tok.lit[0].is_capital())
|
||||||
|| prev_prev.lit in ['C', 'JS']) {
|
|| prev_prev.lit in ['C', 'JS']) {
|
||||||
tok_typ = .symbol
|
tok_typ = .symbol
|
||||||
|
Loading…
Reference in New Issue
Block a user