public ItemExpressionFragment( ExpressionShredder.ItemExpressionCapture capture, string textFragment, ItemSpec <P, I> containingItemSpec, string projectDirectory) : base(textFragment, projectDirectory) { Capture = capture; _containingItemSpec = containingItemSpec; _expander = _containingItemSpec.Expander; }
private void AddReferencedItemLists(OperationBuilder operationBuilder, ExpressionShredder.ItemExpressionCapture match) { if (match.ItemType != null) { AddReferencedItemList(match.ItemType, operationBuilder.ReferencedItemLists); } if (match.Captures != null) { foreach (var subMatch in match.Captures) { AddReferencedItemLists(operationBuilder, subMatch); } } }
private void AddItemReferences(string expression, OperationBuilder operationBuilder, IElementLocation elementLocation) { if (expression.Length == 0) { return; } else { ExpressionShredder.ItemExpressionCapture match = Expander <P, I> .ExpandSingleItemVectorExpressionIntoExpressionCapture( expression, ExpanderOptions.ExpandItems, elementLocation); if (match == null) { return; } AddReferencedItemLists(operationBuilder, match); } }