예제 #1
0
 def makebool(value):
     b = ast.BoolConst(value)
     b.ty = ast.Type('bool')
     return b
예제 #2
0
def p_boolconst(p):
    '''expr : BOOLCONST'''
    p[0] = ast.BoolConst(p[1] == 'true').at(loc(p))