public override object VisitAccounting(AccountingParser.AccountingContext context) { PrintNode(context); var operations = context.operation(); //VisitChildren(context); foreach (var operation in operations) { PrintNode(operation); if (operation.children.Count > 0) { foreach (var child in operation.children) { PrintNode(child); PrintChildValue(child); } } var employee = operation.employee(); var amount = operation.amount(); } // var employee = operation.; // SpeakLine line = new SpeakLine() { Person = name.GetText(), Text = opinion.GetText().Trim('"') }; // Lines.Add(line); return(""); }
/// <summary> /// Visit a parse tree produced by <see cref="AccountingParser.accounting"/>. /// <para> /// The default implementation returns the result of calling <see cref="AbstractParseTreeVisitor{Result}.VisitChildren(IRuleNode)"/> /// on <paramref name="context"/>. /// </para> /// </summary> /// <param name="context">The parse tree.</param> /// <return>The visitor result.</return> public virtual Result VisitAccounting([NotNull] AccountingParser.AccountingContext context) { return(VisitChildren(context)); }
/// <summary> /// Exit a parse tree produced by <see cref="AccountingParser.accounting"/>. /// <para>The default implementation does nothing.</para> /// </summary> /// <param name="context">The parse tree.</param> public virtual void ExitAccounting([NotNull] AccountingParser.AccountingContext context) { }