class Axal::Interpreter
- Axal::Interpreter
- Reference
- Object
Defined in:
lang/interpreter.crConstructors
Instance Method Summary
- #assign_function_args_to_params(stack_frame)
- #assign_function_args_to_params_for_chained_call(stack_frame, param1)
- #convert_x_to_js(item : X, rt) : X
- #env : Hash(String, AST::Expression | X)
- #fetch_ext_code_replacement_value(param)
- #fetch_function_definition(fn_name : String)
- #interpret(ast : Nil | Axal::AST::Program)
- #interpret_array_list(array : AST::ArrayList) : X
-
#interpret_binary_operator(binary_op)
ameba:disable Metrics/CyclomaticComplexity
- #interpret_boolean(boolean)
- #interpret_chained_function_call(fn_call : AST::FunctionCall, param1)
-
#interpret_conditional(conditional)
TODO Empty blocks are accepted both for the IF and for the ELSE.
- #interpret_describe_definition(desc_def)
- #interpret_duktape(value : Duktape::JSPrimitive)
- #interpret_duktape_array(value : Array(Duktape::JSPrimitive)) : X
- #interpret_duktape_hash(value : Hash(String, Duktape::JSPrimitive)) : X
-
#interpret_external_code(external_code) : X
find variables in the external code and fetch from local or global
- #interpret_fetch(url)
- #interpret_function_call(fn_call : AST::FunctionCall)
- #interpret_function_chain(chain : AST::FunctionChain)
- #interpret_function_definition(fn_def)
- #interpret_identifier(identifier)
- #interpret_it_definition(it_def)
- #interpret_json(json : AST::Json)
- #interpret_module_definition(mod_def)
- #interpret_nested_json(json : AST::Json)
- #interpret_nil(nil_node)
-
#interpret_node(node)
ameba:disable Metrics/CyclomaticComplexity
- #interpret_nodes(nodes)
- #interpret_number(number) : Float64
- #interpret_repetition(repetition)
- #interpret_return(ret)
- #interpret_string(string)
- #interpret_unary_operator(unary_op)
- #interpret_var_binding(var_binding)
- #output : Array(String)
- #output=(output : Array(String))
- #println(fn_call)
-
#println_chained(result)
Built in functions
- #program : AST::Program | Nil
- #replace_external_code_variables(external_code, rt)
- #return_detected?(node)
- #test_output : Hash(String, Array(TestResult))
- #test_output=(test_output : Hash(String, Array(TestResult)))
- #unwind_call_stack : Int32
- #unwind_call_stack=(unwind_call_stack : Int32)
Constructor Detail
Instance Method Detail
TODO Empty blocks are accepted both for the IF and for the ELSE. For the IF, the parser returns a block with an empty collection of expressions. For the else, no block is constructed. The evaluation is already resulting in nil, which is the desired behavior. It would be better, however, if the parser also returned a block with no expressions for an ELSE with an empty block, as is the case in an IF with an empty block. Investigate this nuance of the parser in the future.
find variables in the external code and fetch from local or global