(parser)
| 6655 | this.args = { root: rootExpr, prop: this.prop, value }; |
| 6656 | } |
| 6657 | static parse(parser) { |
| 6658 | if (!parser.matchToken("put")) return; |
| 6659 | var value = parser.requireElement("expression"); |
| 6660 | var operationToken = parser.matchAnyToken("into", "before", "after"); |
| 6661 | if (operationToken == null && parser.matchToken("at")) { |
| 6662 | parser.matchToken("the"); |
| 6663 | operationToken = parser.matchAnyToken("start", "end"); |
| 6664 | parser.requireToken("of"); |
| 6665 | } |
| 6666 | if (operationToken == null) { |
| 6667 | parser.raiseExpected("into", "before", "at start of", "at end of", "after"); |
| 6668 | } |
| 6669 | var target = parser.requireElement("expression"); |
| 6670 | while (target.type === "parenthesized") target = target.expr; |
| 6671 | var operation = operationToken.value; |
| 6672 | var rootExpr; |
| 6673 | if (target.type === "arrayIndex" && operation === "into") { |
| 6674 | rootExpr = target.root; |
| 6675 | } else if (target.prop && target.root && operation === "into") { |
| 6676 | rootExpr = target.root; |
| 6677 | } else if (target.type === "symbol" && operation === "into") { |
| 6678 | rootExpr = null; |
| 6679 | } else if (target.type === "attributeRef" && operation === "into") { |
| 6680 | rootExpr = parser.requireElement("implicitMeTarget"); |
| 6681 | } else if (target.type === "styleRef" && operation === "into") { |
| 6682 | rootExpr = parser.requireElement("implicitMeTarget"); |
| 6683 | } else if (target.attribute && operation === "into") { |
| 6684 | rootExpr = target.root; |
| 6685 | } else { |
| 6686 | rootExpr = target; |
| 6687 | } |
| 6688 | return new _PutCommand(target, operation, value, rootExpr); |
| 6689 | } |
| 6690 | putInto(context, root, prop, valueToPut) { |
| 6691 | if (root == null) { |
| 6692 | var value = context.meta.runtime.resolveSymbol(prop, context); |
nothing calls this directly
no test coverage detected