fix issues related to export & function (#2002)
- `unused` function names - confusion with function call syntax fixes #2001
This commit is contained in:
@@ -2417,11 +2417,16 @@ function parse($TEXT, options) {
|
||||
}
|
||||
}
|
||||
|
||||
var is_definition = is("keyword", "var") || is("keyword", "let") || is("keyword", "const");
|
||||
var is_definition = is("keyword", "var")
|
||||
|| is("keyword", "let")
|
||||
|| is("keyword", "const")
|
||||
|| is("keyword", "function") && !is_default;
|
||||
if (is_definition) {
|
||||
exported_definition = statement();
|
||||
} else if (is("keyword", "function")) {
|
||||
exported_value = expr_atom(false);
|
||||
} else {
|
||||
exported_value = expression();
|
||||
exported_value = expression(false);
|
||||
semicolon();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user