コード例 #1
0
        public override object VisitSquareAndCountry(Strict.SquareAndCountryContext context)
        {
            if (ParserWrapper.Parser.NumberOfSyntaxErrors > 0)
            {
                return(null);
            }
            string debug  = context.ToStringTree(ParserWrapper.Parser);
            var    record = new RealtyFromText(ParserWrapper, context);

            if (context.square() != null && context.square().square_value() != null)
            {
                var sc = context.square();
                record.InitializeSquare(sc.square_value().GetText(), sc.HECTARE() != null);
            }
            if (context.square_value() != null)
            {
                record.InitializeSquare(context.square_value().GetText(), false);
            }
            if (context.COUNTRY() != null)
            {
                record.Country = ParserWrapper.GetSourceTextByTerminalNode(context.COUNTRY());
            }

            Lines.Add(record);
            return(record);
        }
コード例 #2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="Strict.squareAndCountry"/>.
 /// <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 VisitSquareAndCountry([NotNull] Strict.SquareAndCountryContext context)
 {
     return(VisitChildren(context));
 }
コード例 #3
0
 /// <summary>
 /// Enter a parse tree produced by <see cref="Strict.squareAndCountry"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void EnterSquareAndCountry([NotNull] Strict.SquareAndCountryContext context)
 {
 }