public PftGroupStatement(PftParser.GroupStatementContext node) : base(node) { PftNonGrouped subTree = new PftNonGrouped(node.nonGrouped()); Children.Add(subTree); // TODO: просматривать также ссылки на глобальные переменные List <PftFieldReference> refs = subTree .GetDescendants <PftFieldReference>(); if (refs.Count != 0) { Field = refs[0]; Tag = Field.Field.Field; foreach (PftFieldReference fld in refs) { if (fld.Field.Field == Tag) { fld.Group = this; } } } // ѕомечаем все чувствительные элементы формата // как вход¤щие в повтор¤ющуюс¤ группу. subTree .GetDescendants <PftGroupItem>() .ForEach(item => item.Group = this); }
public PftRefFunction(PftParser.RefFunctionContext node) : base(node) { Argument1 = new PftArithExpression(node.arg1); Children.Add(Argument1); Argument2 = PftNonGrouped.DispatchContext(node.arg2); Children.Add(Argument2); }
public PftFormatItemPlus(PftParser.FormatItemPlusContext node) : base(node) { foreach (PftParser.FormatItemContext context in node.formatItem()) { PftAst item = PftNonGrouped.DispatchContext(context); Children.Add(item); } }
public PftConditionString(PftParser.ConditionStringContext node) : base(node) { var context = node.stringTest(); Left = PftNonGrouped.DispatchContext(context.left); Children.Add(Left); Op = context.op.Text; Right = PftNonGrouped.DispatchContext(context.right); Children.Add(Right); }
public PftRminFunction(PftParser.RminFunctionContext node) : base(node) { Argument = PftNonGrouped.DispatchContext(node.nonGrouped()); Children.Add(Argument); }
public PftTrimFunction(PftParser.TrimFunctionContext node) : base(node) { Arguments = new PftNonGrouped(node.nonGrouped()); }
public PftLFunction(PftParser.LFunctionContext node) : base(node) { Argument = PftNonGrouped.DispatchContext(node.nonGrouped()); }