Exemplo n.º 1
0
 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);
 }
Exemplo n.º 2
0
 public static INonterminalRef SetResult(this IList<INodeRef> source, INonterminalRef value)
 {
     source[ResultIndex] = value;
     return value;
 }
Exemplo n.º 3
0
 public static INonterminalRef SetVariables(this IList<INodeRef> source, INonterminalRef value)
 {
     source[VariablesIndex] = value;
     return value;
 }
Exemplo n.º 4
0
 public static INonterminalRef SetFormulas(this IList<INodeRef> source, INonterminalRef value)
 {
     source[FormulasIndex] = value;
     return value;
 }