js: support `[if userflag?]` fn tags

pull/12467/head
Delyan Angelov 2021-11-15 13:23:27 +02:00
parent 7b723262e4
commit 1d2b16dde2
No known key found for this signature in database
GPG Key ID: 66886C0F12D595ED
1 changed files with 3 additions and 0 deletions

View File

@ -268,6 +268,9 @@ fn (mut g JsGen) method_call(node ast.CallExpr) {
}
fn (mut g JsGen) gen_call_expr(it ast.CallExpr) {
if it.should_be_skipped {
return
}
if it.is_method && g.table.get_type_symbol(it.receiver_type).name.starts_with('JS.') {
g.js_method_call(it)
return