mirror of
https://github.com/BoardWare-Genius/jarvis-models.git
synced 2025-12-13 16:53:24 +00:00
feat: runtime boolean
This commit is contained in:
@ -69,12 +69,14 @@ class Runtime:
|
||||
return int(ast.get("value"))
|
||||
elif ast.get("type") == "FloatLiteral":
|
||||
return float(ast.get("value"))
|
||||
elif ast.get("type") == "BooleanLiteral":
|
||||
return bool(ast.get("value"))
|
||||
|
||||
def _is_identifier(self, ast):
|
||||
return ast["type"] == "Identifier"
|
||||
|
||||
def _is_literal(self, ast):
|
||||
return ast["type"] in ["NumericLiteral", "StringLiteral", "FloatLiteral"]
|
||||
return ast["type"] in ["NumericLiteral", "StringLiteral", "FloatLiteral", "BooleanLiteral"]
|
||||
|
||||
def exec_return(self, ast):
|
||||
v = ast.get("value")
|
||||
|
||||
Reference in New Issue
Block a user