(parser)
| 7422 | } |
| 7423 | } |
| 7424 | static parse(parser) { |
| 7425 | let lookAhead = parser.token(1); |
| 7426 | if (!(lookAhead && lookAhead.op && (lookAhead.value === "." || lookAhead.value === "("))) { |
| 7427 | return null; |
| 7428 | } |
| 7429 | var expr = parser.requireElement("primaryExpression"); |
| 7430 | var rootRoot = expr.root; |
| 7431 | var root = expr; |
| 7432 | while (rootRoot.root != null) { |
| 7433 | root = root.root; |
| 7434 | rootRoot = rootRoot.root; |
| 7435 | } |
| 7436 | if (expr.type !== "functionCall") { |
| 7437 | parser.raiseError("Pseudo-commands must be function calls"); |
| 7438 | } |
| 7439 | if (root.type === "functionCall" && root.root.root == null) { |
| 7440 | if (parser.matchAnyToken("the", "to", "on", "with", "into", "from", "at")) { |
| 7441 | var realRoot = parser.requireElement("expression"); |
| 7442 | } else if (parser.matchToken("me")) { |
| 7443 | var realRoot = parser.requireElement("implicitMeTarget"); |
| 7444 | } |
| 7445 | } |
| 7446 | if (realRoot) { |
| 7447 | return new _PseudoCommand("target", expr, realRoot, root); |
| 7448 | } else { |
| 7449 | return new _PseudoCommand("simple", expr, null, null); |
| 7450 | } |
| 7451 | } |
| 7452 | resolve(context, { target, argVals, result }) { |
| 7453 | if (this.variant === "target") { |
| 7454 | context.meta.runtime.nullCheck(target, this._realRoot); |
nothing calls this directly
no test coverage detected