Search in sources :

Example 1 with FloatLiteralNode

use of org.checkerframework.dataflow.cfg.node.FloatLiteralNode in project checker-framework by typetools.

the class CFGTranslationPhaseOne method visitLiteral.

@Override
public Node visitLiteral(LiteralTree tree, Void p) {
    Node r = null;
    switch(tree.getKind()) {
        case BOOLEAN_LITERAL:
            r = new BooleanLiteralNode(tree);
            break;
        case CHAR_LITERAL:
            r = new CharacterLiteralNode(tree);
            break;
        case DOUBLE_LITERAL:
            r = new DoubleLiteralNode(tree);
            break;
        case FLOAT_LITERAL:
            r = new FloatLiteralNode(tree);
            break;
        case INT_LITERAL:
            r = new IntegerLiteralNode(tree);
            break;
        case LONG_LITERAL:
            r = new LongLiteralNode(tree);
            break;
        case NULL_LITERAL:
            r = new NullLiteralNode(tree);
            break;
        case STRING_LITERAL:
            r = new StringLiteralNode(tree);
            break;
        default:
            throw new BugInCF("unexpected literal tree");
    }
    assert r != null : "unexpected literal tree";
    extendWithNode(r);
    return r;
}
Also used : LongLiteralNode(org.checkerframework.dataflow.cfg.node.LongLiteralNode) CharacterLiteralNode(org.checkerframework.dataflow.cfg.node.CharacterLiteralNode) BooleanLiteralNode(org.checkerframework.dataflow.cfg.node.BooleanLiteralNode) FloatLiteralNode(org.checkerframework.dataflow.cfg.node.FloatLiteralNode) NumericalMultiplicationNode(org.checkerframework.dataflow.cfg.node.NumericalMultiplicationNode) ArrayCreationNode(org.checkerframework.dataflow.cfg.node.ArrayCreationNode) ValueLiteralNode(org.checkerframework.dataflow.cfg.node.ValueLiteralNode) StringConversionNode(org.checkerframework.dataflow.cfg.node.StringConversionNode) UnsignedRightShiftNode(org.checkerframework.dataflow.cfg.node.UnsignedRightShiftNode) LeftShiftNode(org.checkerframework.dataflow.cfg.node.LeftShiftNode) PrimitiveTypeNode(org.checkerframework.dataflow.cfg.node.PrimitiveTypeNode) FloatLiteralNode(org.checkerframework.dataflow.cfg.node.FloatLiteralNode) LessThanNode(org.checkerframework.dataflow.cfg.node.LessThanNode) BitwiseOrNode(org.checkerframework.dataflow.cfg.node.BitwiseOrNode) LocalVariableNode(org.checkerframework.dataflow.cfg.node.LocalVariableNode) NarrowingConversionNode(org.checkerframework.dataflow.cfg.node.NarrowingConversionNode) EqualToNode(org.checkerframework.dataflow.cfg.node.EqualToNode) NumericalPlusNode(org.checkerframework.dataflow.cfg.node.NumericalPlusNode) ConditionalAndNode(org.checkerframework.dataflow.cfg.node.ConditionalAndNode) VariableDeclarationNode(org.checkerframework.dataflow.cfg.node.VariableDeclarationNode) ClassDeclarationNode(org.checkerframework.dataflow.cfg.node.ClassDeclarationNode) IntegerDivisionNode(org.checkerframework.dataflow.cfg.node.IntegerDivisionNode) AssertionErrorNode(org.checkerframework.dataflow.cfg.node.AssertionErrorNode) InstanceOfNode(org.checkerframework.dataflow.cfg.node.InstanceOfNode) BooleanLiteralNode(org.checkerframework.dataflow.cfg.node.BooleanLiteralNode) ThisNode(org.checkerframework.dataflow.cfg.node.ThisNode) AssignmentNode(org.checkerframework.dataflow.cfg.node.AssignmentNode) NullLiteralNode(org.checkerframework.dataflow.cfg.node.NullLiteralNode) ArrayTypeNode(org.checkerframework.dataflow.cfg.node.ArrayTypeNode) LambdaResultExpressionNode(org.checkerframework.dataflow.cfg.node.LambdaResultExpressionNode) IntegerRemainderNode(org.checkerframework.dataflow.cfg.node.IntegerRemainderNode) FieldAccessNode(org.checkerframework.dataflow.cfg.node.FieldAccessNode) ConditionalOrNode(org.checkerframework.dataflow.cfg.node.ConditionalOrNode) NotEqualNode(org.checkerframework.dataflow.cfg.node.NotEqualNode) BitwiseXorNode(org.checkerframework.dataflow.cfg.node.BitwiseXorNode) ArrayAccessNode(org.checkerframework.dataflow.cfg.node.ArrayAccessNode) ExplicitThisNode(org.checkerframework.dataflow.cfg.node.ExplicitThisNode) StringConcatenateNode(org.checkerframework.dataflow.cfg.node.StringConcatenateNode) NullChkNode(org.checkerframework.dataflow.cfg.node.NullChkNode) CharacterLiteralNode(org.checkerframework.dataflow.cfg.node.CharacterLiteralNode) FloatingDivisionNode(org.checkerframework.dataflow.cfg.node.FloatingDivisionNode) FunctionalInterfaceNode(org.checkerframework.dataflow.cfg.node.FunctionalInterfaceNode) StringConcatenateAssignmentNode(org.checkerframework.dataflow.cfg.node.StringConcatenateAssignmentNode) TypeCastNode(org.checkerframework.dataflow.cfg.node.TypeCastNode) MethodAccessNode(org.checkerframework.dataflow.cfg.node.MethodAccessNode) WideningConversionNode(org.checkerframework.dataflow.cfg.node.WideningConversionNode) LongLiteralNode(org.checkerframework.dataflow.cfg.node.LongLiteralNode) MarkerNode(org.checkerframework.dataflow.cfg.node.MarkerNode) ImplicitThisNode(org.checkerframework.dataflow.cfg.node.ImplicitThisNode) FloatingRemainderNode(org.checkerframework.dataflow.cfg.node.FloatingRemainderNode) ClassNameNode(org.checkerframework.dataflow.cfg.node.ClassNameNode) ObjectCreationNode(org.checkerframework.dataflow.cfg.node.ObjectCreationNode) PackageNameNode(org.checkerframework.dataflow.cfg.node.PackageNameNode) DoubleLiteralNode(org.checkerframework.dataflow.cfg.node.DoubleLiteralNode) SuperNode(org.checkerframework.dataflow.cfg.node.SuperNode) IntegerLiteralNode(org.checkerframework.dataflow.cfg.node.IntegerLiteralNode) SignedRightShiftNode(org.checkerframework.dataflow.cfg.node.SignedRightShiftNode) ThrowNode(org.checkerframework.dataflow.cfg.node.ThrowNode) GreaterThanOrEqualNode(org.checkerframework.dataflow.cfg.node.GreaterThanOrEqualNode) StringLiteralNode(org.checkerframework.dataflow.cfg.node.StringLiteralNode) TernaryExpressionNode(org.checkerframework.dataflow.cfg.node.TernaryExpressionNode) BitwiseAndNode(org.checkerframework.dataflow.cfg.node.BitwiseAndNode) ParameterizedTypeNode(org.checkerframework.dataflow.cfg.node.ParameterizedTypeNode) CaseNode(org.checkerframework.dataflow.cfg.node.CaseNode) SwitchExpressionNode(org.checkerframework.dataflow.cfg.node.SwitchExpressionNode) NumericalAdditionNode(org.checkerframework.dataflow.cfg.node.NumericalAdditionNode) NumericalSubtractionNode(org.checkerframework.dataflow.cfg.node.NumericalSubtractionNode) BitwiseComplementNode(org.checkerframework.dataflow.cfg.node.BitwiseComplementNode) ConditionalNotNode(org.checkerframework.dataflow.cfg.node.ConditionalNotNode) NumericalMinusNode(org.checkerframework.dataflow.cfg.node.NumericalMinusNode) ReturnNode(org.checkerframework.dataflow.cfg.node.ReturnNode) MethodInvocationNode(org.checkerframework.dataflow.cfg.node.MethodInvocationNode) GreaterThanNode(org.checkerframework.dataflow.cfg.node.GreaterThanNode) LessThanOrEqualNode(org.checkerframework.dataflow.cfg.node.LessThanOrEqualNode) SynchronizedNode(org.checkerframework.dataflow.cfg.node.SynchronizedNode) Node(org.checkerframework.dataflow.cfg.node.Node) IntegerLiteralNode(org.checkerframework.dataflow.cfg.node.IntegerLiteralNode) DoubleLiteralNode(org.checkerframework.dataflow.cfg.node.DoubleLiteralNode) NullLiteralNode(org.checkerframework.dataflow.cfg.node.NullLiteralNode) BugInCF(org.checkerframework.javacutil.BugInCF) StringLiteralNode(org.checkerframework.dataflow.cfg.node.StringLiteralNode)

Aggregations

ArrayAccessNode (org.checkerframework.dataflow.cfg.node.ArrayAccessNode)1 ArrayCreationNode (org.checkerframework.dataflow.cfg.node.ArrayCreationNode)1 ArrayTypeNode (org.checkerframework.dataflow.cfg.node.ArrayTypeNode)1 AssertionErrorNode (org.checkerframework.dataflow.cfg.node.AssertionErrorNode)1 AssignmentNode (org.checkerframework.dataflow.cfg.node.AssignmentNode)1 BitwiseAndNode (org.checkerframework.dataflow.cfg.node.BitwiseAndNode)1 BitwiseComplementNode (org.checkerframework.dataflow.cfg.node.BitwiseComplementNode)1 BitwiseOrNode (org.checkerframework.dataflow.cfg.node.BitwiseOrNode)1 BitwiseXorNode (org.checkerframework.dataflow.cfg.node.BitwiseXorNode)1 BooleanLiteralNode (org.checkerframework.dataflow.cfg.node.BooleanLiteralNode)1 CaseNode (org.checkerframework.dataflow.cfg.node.CaseNode)1 CharacterLiteralNode (org.checkerframework.dataflow.cfg.node.CharacterLiteralNode)1 ClassDeclarationNode (org.checkerframework.dataflow.cfg.node.ClassDeclarationNode)1 ClassNameNode (org.checkerframework.dataflow.cfg.node.ClassNameNode)1 ConditionalAndNode (org.checkerframework.dataflow.cfg.node.ConditionalAndNode)1 ConditionalNotNode (org.checkerframework.dataflow.cfg.node.ConditionalNotNode)1 ConditionalOrNode (org.checkerframework.dataflow.cfg.node.ConditionalOrNode)1 DoubleLiteralNode (org.checkerframework.dataflow.cfg.node.DoubleLiteralNode)1 EqualToNode (org.checkerframework.dataflow.cfg.node.EqualToNode)1 ExplicitThisNode (org.checkerframework.dataflow.cfg.node.ExplicitThisNode)1