Esempio n. 1
0
        public override ASTNode VisitIfBlock([NotNull] DaedalusParser.IfBlockContext context)
        {
            ExpressionNode       conditionNode  = (ExpressionNode)Visit(context.expression());
            List <StatementNode> statementNodes = GetStatementNodes(context.statementBlock());

            return(new ConditionalNode(GetLocation(context), conditionNode, statementNodes));
        }
Esempio n. 2
0
 /// <summary>
 /// Visit a parse tree produced by <see cref="DaedalusParser.ifBlock"/>.
 /// <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 VisitIfBlock([NotNull] DaedalusParser.IfBlockContext context)
 {
     return(VisitChildren(context));
 }
Esempio n. 3
0
 public override void ExitIfBlock(DaedalusParser.IfBlockContext context)
 {
     _assemblyBuilder.IfBlockEnd();
 }
Esempio n. 4
0
 public override void EnterIfBlock(DaedalusParser.IfBlockContext context)
 {
     _assemblyBuilder.IfBlockStart();
 }
 /// <summary>
 /// Exit a parse tree produced by <see cref="DaedalusParser.ifBlock"/>.
 /// <para>The default implementation does nothing.</para>
 /// </summary>
 /// <param name="context">The parse tree.</param>
 public virtual void ExitIfBlock([NotNull] DaedalusParser.IfBlockContext context)
 {
 }