(parser)
| 3719 | this.targetExpr = targetExpr || null; |
| 3720 | } |
| 3721 | static parse(parser) { |
| 3722 | var scope = "default"; |
| 3723 | if (parser.matchToken("global")) { |
| 3724 | scope = "global"; |
| 3725 | } else if (parser.matchToken("element")) { |
| 3726 | scope = "element"; |
| 3727 | if (parser.matchOpToken("'")) { |
| 3728 | parser.requireToken("s"); |
| 3729 | } |
| 3730 | } else if (parser.matchToken("dom")) { |
| 3731 | scope = "inherited"; |
| 3732 | } else if (parser.matchToken("local")) { |
| 3733 | scope = "local"; |
| 3734 | } |
| 3735 | let eltPrefix = parser.matchOpToken(":"); |
| 3736 | let caretPrefix = !eltPrefix && parser.matchOpToken("^"); |
| 3737 | let identifier = parser.matchTokenType("IDENTIFIER"); |
| 3738 | if (identifier && identifier.value) { |
| 3739 | var name = identifier.value; |
| 3740 | if (eltPrefix) { |
| 3741 | name = ":" + name; |
| 3742 | } else if (caretPrefix) { |
| 3743 | name = "^" + name; |
| 3744 | } |
| 3745 | if (scope === "default") { |
| 3746 | if (name.startsWith("$")) { |
| 3747 | scope = "global"; |
| 3748 | } else if (name.startsWith(":")) { |
| 3749 | scope = "element"; |
| 3750 | } else if (name.startsWith("^")) { |
| 3751 | scope = "inherited"; |
| 3752 | } |
| 3753 | } |
| 3754 | var targetExpr = null; |
| 3755 | if (scope === "inherited" && parser.matchToken("on")) { |
| 3756 | var follows = parser.pushFollows("to", "into", "before", "after", "then"); |
| 3757 | try { |
| 3758 | targetExpr = parser.requireElement("expression"); |
| 3759 | } finally { |
| 3760 | parser.popFollows(follows); |
| 3761 | } |
| 3762 | } |
| 3763 | return new _SymbolRef(identifier, scope, name, targetExpr); |
| 3764 | } |
| 3765 | } |
| 3766 | resolve(context) { |
| 3767 | return context.meta.runtime.resolveSymbol( |
| 3768 | this.name, |
nothing calls this directly
no test coverage detected