Exemple #1
0
 public override void EnterSingleLineIfStmt([NotNull] VBAParser.SingleLineIfStmtContext context)
 {
     if (context.ifWithEmptyThen() != null)
     {
         AddResult(new QualifiedContext <ParserRuleContext>(CurrentModuleName, context.ifWithEmptyThen()));
     }
 }
Exemple #2
0
 public override void EnterSingleLineIfStmt([NotNull] VBAParser.SingleLineIfStmtContext context)
 {
     if (context.ifWithEmptyThen() != null)
     {
         SaveContext(context.ifWithEmptyThen());
     }
 }
Exemple #3
0
 public void Resolve(VBAParser.SingleLineIfStmtContext context)
 {
     // The listOrLabel rule could be resolved separately but since it's such a special case, only appearing in
     // single-line-if-statements, we do it here for better understanding.
     if (context.ifWithEmptyThen() != null)
     {
         ResolveDefault(context.ifWithEmptyThen().booleanExpression());
         ResolveListOrLabel(context.ifWithEmptyThen().singleLineElseClause().listOrLabel());
     }
     else
     {
         ResolveDefault(context.ifWithNonEmptyThen().booleanExpression());
         ResolveListOrLabel(context.ifWithNonEmptyThen().listOrLabel());
         if (context.ifWithNonEmptyThen().singleLineElseClause() != null)
         {
             ResolveListOrLabel(context.ifWithNonEmptyThen().singleLineElseClause().listOrLabel());
         }
     }
 }
 public override void EnterSingleLineIfStmt(VBAParser.SingleLineIfStmtContext context)
 {
     _resolver.Resolve(context);
 }