Commit dacb0807 authored by dbarbera's avatar dbarbera
Browse files

Added boolean values generation

parent 8e741133
......@@ -341,7 +341,10 @@ def _real(primary):
@expression.register(ogAST.PrimBoolean)
def _boolean(primary):
''' Generate code for a raw boolean value '''
raise NotImplementedError
if primary.value[0].lower() == 'true':
return core.Constant.int(core.Type.int(1), 1)
else:
return core.Constant.int(core.Type.int(1), 0)
@expression.register(ogAST.PrimEmptyString)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment