protected internal BlockFormulaRef( IBlockFormulaRef parentBlock, Collection<IBlockFormulaRef> childBlocks, Collection<IFormulaRef> variables, Collection<IFormulaRef> formulas, IFormulaRef result, ITypeDeclaration type, IFormulaRef parent) : base(parentBlock, childBlocks.ToReadOnlyWithCast<IBlockFormula>(), variables.ToReadOnlyWithCast<IFormula>(), formulas.ToReadOnlyWithCast<IFormula>(), result, type, parent) { this.parent = parent; this.parentBlock = parentBlock; this.childBlocks = childBlocks; this.variables = variables; this.formulas = formulas; this.result = result; }
public void PushBlock() { CurrentBlock = FormulaRef.Block(CurrentBlock); }
public void PopBlock() { if (CurrentBlock == null) { throw new InvalidOperationException(); } else { CurrentBlock = CurrentBlock.ParentBlock; } }
public static IBlockFormulaRef Block(IBlockFormulaRef parentBlock) { return new BlockFormulaRef() { ParentBlock = parentBlock }; }
public static IBlockFormulaRef Block(IBlockFormulaRef parentBlock) { throw new NotImplementedException(); }
public static Collection<INodeRef> ToProperties( ITerminalRef<ITypeDeclaration> type, IBlockFormulaRef parentBlock, IBlockFormulaRef childBlocks, INonterminalRef variables, INonterminalRef formulas, INonterminalRef result) { var list = (IList<INodeRef>)new List<INodeRef>(); INonterminalMixin.InsertToProperties(new NodeTypeRef(NonterminalType.Block), type, ref list); list.Insert(ParentBlockIndex, parentBlock); list.Insert(ChildBlocksIndex, childBlocks); list.Insert(VariablesIndex, variables); list.Insert(FormulasIndex, formulas); list.Insert(ResultIndex, result); return new Collection<INodeRef>(list); }
public static IBlockFormulaRef SetParentBlock(this IList<INodeRef> source, IBlockFormulaRef value) { source[ParentBlockIndex] = value; return value; }
public static IBlockFormulaRef SetChildBlocks(this IList<INodeRef> source, IBlockFormulaRef value) { source[ChildBlocksIndex] = value; return value; }
public void PushBlock() { CurrentBlock = NonterminalRef.Block(CurrentBlock); }