Lines Matching refs:is

712     function is(type, value) {  function
729 S.token.type == "string" || is("punc", ";")
761 if (is(type, val)) return next();
777 && (is("eof") || is("punc", "}") || has_newline_before(S.token));
781 if (is("punc", ";")) next();
804 if (is("operator", "/") || is("operator", "/=")) {
840 if (!is("operator", "*")) return function_(AST_AsyncDefun);
943 if (!is("operator", "*")) return function_(AST_Defun);
956 if (is("punc", ";")) {
1056 if (!is("name", name)) return;
1077 if (is("keyword", "extends")) {
1084 while (!is("punc", "}")) {
1085 if (is("punc", ";")) {
1092 if (is("operator", "*")) {
1094 var internal = is("name") && /^#/.test(S.token.value);
1110 if (fixed && is("punc", "{")) {
1122 var internal = is("name") && /^#/.test(S.token.value);
1124 if (is("punc", "(")) {
1141 if (is("operator", "=")) {
1148 } else if (!(is("punc", ";") || is("punc", "}"))) {
1162 private: is("name") && /^#/.test(S.token.value),
1192 var await_token = is("name", "await") && next();
1195 if (await_token || !is("punc", ";")) {
1196 init = is("keyword", "const")
1198 : is("name", "let") && is_vardefs()
1200 : is("keyword", "var")
1207 } else if (is("operator", "in")) {
1210 } else if (is("name", "of")) {
1233 var test = is("punc", ";") ? null : expression();
1235 var step = is("punc", ")") ? null : expression();
1341 if (is("punc", "{")) {
1421 if (is("keyword", "else")) {
1433 return is("name") || is("string") || is_identifier_string(S.token.value);
1453 if (is("operator", "*")) {
1457 if (is("name", "as")) {
1470 if (is("punc", "{")) {
1478 if (is("name", "as")) {
1486 if (!is("punc", "}")) expect(",");
1489 if (is("name", "from")) {
1507 if (is("keyword", "default")) {
1533 if (is("name", "async")) {
1537 … if (!is("operator", "*")) return maybe_named(AST_AsyncDefun, function_(AST_AsyncFunction));
1540 } else if (is("keyword")) switch (S.token.value) {
1546 if (!is("operator", "*")) return maybe_named(AST_Defun, function_(AST_Function));
1553 if (is("name")) switch (S.token.value) {
1557 if (!is("operator", "*")) return function_(AST_AsyncDefun);
1565 } else if (is("keyword")) switch (S.token.value) {
1576 if (!is("operator", "*")) return function_(AST_Defun);
1599 if (cont = is("punc", ",")) next();
1601 cont = !is("string");
1604 if (is("operator", "*")) {
1630 if (!is("punc", "}")) expect(",");
1647 while (!is("punc", "}")) {
1648 if (is("eof")) expect("}");
1658 while (!is("punc", "}")) {
1659 if (is("eof")) expect("}");
1660 if (is("keyword", "case")) {
1670 } else if (is("keyword", "default")) {
1692 if (is("keyword", "catch")) {
1696 if (is("punc", "(")) {
1708 if (is("keyword", "finally")) {
1732 if (is("operator", "=")) {
1744 if (!is("punc", ","))
1784 if (is("punc", ".") && is_token(peek(), "name", "target")) {
1790 if (is("punc", "(")) {
1847 if (is("operator", "new")) {
1851 if (is("punc")) {
1857 if (is("punc", ")")) {
1886 … if (is("punc", "=>")) return arrow(ex instanceof AST_Sequence ? ex.expressions : [ ex ], start);
1895 if (is("keyword")) switch (start.value) {
1905 if (is("operator", "*")) {
1915 if (is("name")) {
1919 if (is("keyword", "function")) {
1922 if (is("operator", "*")) {
1932 if (is("name") && is_token(peek(), "punc", "=>")) {
1938 if (is("punc", "(")) {
1940 if (!is("punc", "=>")) return call;
1948 return is("punc", "=>") ? arrow([ sym ], start) : subscripts(sym, allow_calls);
1959 while (!is("punc", closing)) {
1961 if (allow_trailing_comma && is("punc", closing)) break;
1962 if (allow_empty && is("punc", ",")) {
1964 } else if (!is("operator", "...")) {
1997 while (!is("punc", "}")) {
2000 if (!options.strict && is("punc", "}")) break;
2002 if (is("operator", "*")) {
2017 if (is("operator", "...")) {
2053 if (is("punc", "(")) {
2066 if (is("punc", ":")) {
2078 var is_gen = is("operator", "*") && next();
2171 if (!is("name")) {
2185 if (is("punc", "[")) {
2197 if (is("punc", "{")) {
2200 while (!is("punc", "}")) {
2203 if (!options.strict && is("punc", "}")) break;
2205 if (is("punc", "[") || is_token(peek(), "punc", ":")) {
2216 if (is("operator", "...")) {
2222 if (is("operator", "=")) {
2252 if (!is("operator", "=")) return name;
2270 if (!is("punc", "}")) unexpected();
2286 if (is("operator", "?") && is_token(peek(), "punc", ".")) {
2291 if (is("punc", "[")) {
2302 } else if (allow_calls && is("punc", "(")) {
2311 } else if (optional === expr || is("punc", ".")) {
2320 } else if (is("punc", "`")) {
2344 if (S.in_async && is("name", "await")) {
2354 if (S.in_generator && is("name", "yield")) {
2360 if (is("operator", "*")) {
2364 … } else if (is("punc") ? !PUNC_AFTER_EXPRESSION[S.token.value] : !can_insert_semicolon()) {
2374 if (is("operator") && UNARY_PREFIX[start.value]) {
2383 while (is("operator") && UNARY_POSTFIX[S.token.value] && !has_newline_before(S.token)) {
2409 var op = is("operator") ? S.token.value : null;
2433 if (is("operator", "?")) {
2513 if (is("operator") && ASSIGNMENT[val]) {
2533 if (maybe_arrow && is("operator", "...")) {
2539 if (!is("punc", ",")) break;
2541 if (maybe_arrow && is("punc", ")") && is_token(peek(), "punc", "=>")) break;
2572 while (!is("eof"))