Beispiel #1
0
 def check_type(elem):
     return AST.Integer(elem) if isinstance(
         elem,
         int) else AST.Float(elem) if isinstance(elem, float) else elem
Beispiel #2
0
def p_expression_int(p):
    """expression : INTEGER"""
    p[0] = AST.Integer(p[1])