Exemplo n.º 1
0
def p_literal_false(p):
    'literal : FALSE'
    p[0] = ast.ConstantExpr('False', lines=p.lineno(1))
Exemplo n.º 2
0
def p_literal_true(p):
    'literal : TRUE'
    p[0] = ast.ConstantExpr('True', lines=p.lineno(1))
Exemplo n.º 3
0
def p_literal_null(p):
    'literal : NULL'
    p[0] = ast.ConstantExpr('Null', lines=p.lineno(1))
Exemplo n.º 4
0
def p_literal_string_const(p):
    'literal : STRING_CONST'
    p[0] = ast.ConstantExpr('string', p[1], lines=p.lineno(1))
Exemplo n.º 5
0
def p_literal_float_const(p):
    'literal : FLOAT_CONST'
    p[0] = ast.ConstantExpr('float', p[1], lines=p.lineno(1))
Exemplo n.º 6
0
def p_literal_int_const(p):
    'literal : INT_CONST'
    p[0] = ast.ConstantExpr('int', p[1], lines=p.lineno(1))