(parser)
| 6296 | this.args = { root: rootExpr, prop: this.prop, value }; |
| 6297 | } |
| 6298 | static parse(parser) { |
| 6299 | if (!parser.matchToken("put")) return; |
| 6300 | var value = parser.requireElement("expression"); |
| 6301 | var operationToken = parser.matchAnyToken("into", "before", "after"); |
| 6302 | if (operationToken == null && parser.matchToken("at")) { |
| 6303 | parser.matchToken("the"); |
| 6304 | operationToken = parser.matchAnyToken("start", "end"); |
| 6305 | parser.requireToken("of"); |
| 6306 | } |
| 6307 | if (operationToken == null) { |
| 6308 | parser.raiseExpected("into", "before", "at start of", "at end of", "after"); |
| 6309 | } |
| 6310 | var target = parser.requireElement("expression"); |
| 6311 | while (target.type === "parenthesized") target = target.expr; |
| 6312 | var operation = operationToken.value; |
| 6313 | var rootExpr; |
| 6314 | if (target.type === "arrayIndex" && operation === "into") { |
| 6315 | rootExpr = target.root; |
| 6316 | } else if (target.prop && target.root && operation === "into") { |
| 6317 | rootExpr = target.root; |
| 6318 | } else if (target.type === "symbol" && operation === "into") { |
| 6319 | rootExpr = null; |
| 6320 | } else if (target.type === "attributeRef" && operation === "into") { |
| 6321 | rootExpr = parser.requireElement("implicitMeTarget"); |
| 6322 | } else if (target.type === "styleRef" && operation === "into") { |
| 6323 | rootExpr = parser.requireElement("implicitMeTarget"); |
| 6324 | } else if (target.attribute && operation === "into") { |
| 6325 | rootExpr = target.root; |
| 6326 | } else { |
| 6327 | rootExpr = target; |
| 6328 | } |
| 6329 | return new _PutCommand(target, operation, value, rootExpr); |
| 6330 | } |
| 6331 | putInto(context, root, prop, valueToPut) { |
| 6332 | if (root == null) { |
| 6333 | var value = context.meta.runtime.resolveSymbol(prop, context); |
nothing calls this directly
no test coverage detected