├── .gitignore ├── CHANGELOG.md ├── LICENSE ├── README.md ├── benchmark ├── binary_trees.lox ├── equality.lox ├── fib.lox ├── instantiation.lox ├── invocation.lox ├── method_call.lox ├── properties.lox ├── string_equality.lox ├── trees.lox └── zoo.lox ├── doc └── intro.md ├── project.clj ├── src └── cloxure │ ├── ast.clj │ ├── callable.clj │ ├── core.clj │ ├── environment.clj │ ├── error.clj │ ├── interpreter.clj │ ├── parser.clj │ ├── pretty.clj │ ├── resolver.clj │ ├── scanner.clj │ └── token.clj └── test ├── cloxure └── core_test.clj └── resources ├── assignment ├── associativity.lox ├── global.lox ├── grouping.lox ├── infix_operator.lox ├── local.lox ├── prefix_operator.lox ├── syntax.lox ├── to_this.lox └── undefined.lox ├── block ├── empty.lox ├── scope.lox └── unclosed.lox ├── bool ├── equality.lox └── not.lox ├── call ├── bool.lox ├── nil.lox ├── num.lox ├── object.lox └── string.lox ├── class ├── empty.lox ├── inherit_self.lox ├── inherited_method.lox ├── local_inherit_other.lox ├── local_inherit_self.lox ├── local_reference_self.lox └── reference_self.lox ├── closure ├── assign_to_closure.lox ├── assign_to_shadowed_later.lox ├── close_over_function_parameter.lox ├── close_over_later_variable.lox ├── close_over_method_parameter.lox ├── closed_closure_in_function.lox ├── nested_closure.lox ├── open_closure_in_function.lox ├── reference_closure_multiple_times.lox ├── reuse_closure_slot.lox ├── shadow_closure_with_local.lox ├── unused_closure.lox └── unused_later_closure.lox ├── comments ├── line_at_eof.lox ├── only_line_comment.lox ├── only_line_comment_and_line.lox └── unicode.lox ├── constructor ├── empty_file.lox ├── field ├── call_function_field.lox ├── call_nonfunction_field.lox ├── get_and_set_method.lox ├── get_on_bool.lox ├── get_on_class.lox ├── get_on_function.lox ├── get_on_nil.lox ├── get_on_num.lox ├── get_on_string.lox ├── many.lox ├── method.lox ├── method_binds_this.lox ├── on_instance.lox ├── set_evaluation_order.lox ├── set_on_bool.lox ├── set_on_class.lox ├── set_on_function.lox ├── set_on_nil.lox ├── set_on_num.lox ├── set_on_string.lox └── undefined.lox ├── for ├── class_in_body.lox ├── closure_in_body.lox ├── fun_in_body.lox ├── return_closure.lox ├── return_inside.lox ├── scope.lox ├── statement_condition.lox ├── statement_increment.lox ├── statement_initializer.lox ├── syntax.lox └── var_in_body.lox ├── function ├── body_must_be_block.lox ├── empty_body.lox ├── extra_arguments.lox ├── local_mutual_recursion.lox ├── local_recursion.lox ├── missing_arguments.lox ├── missing_comma_in_parameters.lox ├── mutual_recursion.lox ├── parameters.lox ├── print.lox ├── recursion.lox ├── too_many_arguments.lox └── too_many_parameters.lox ├── if ├── class_in_else.lox ├── class_in_then.lox ├── dangling_else.lox ├── else.lox ├── fun_in_else.lox ├── fun_in_then.lox ├── if.lox ├── truth.lox ├── var_in_else.lox └── var_in_then.lox ├── inheritance ├── constructor.lox ├── inherit_from_function.lox ├── inherit_from_nil.lox ├── inherit_from_number.lox ├── inherit_methods.lox ├── parenthesized_superclass.lox └── set_fields_from_base_class.lox ├── logical_operator ├── and.lox ├── and_truth.lox ├── or.lox └── or_truth.lox ├── method ├── arity.lox ├── empty_block.lox ├── extra_arguments.lox ├── missing_arguments.lox ├── not_found.lox ├── print_bound_method.lox ├── refer_to_name.lox ├── too_many_arguments.lox └── too_many_parameters.lox ├── nil └── literal.lox ├── number ├── decimal_point_at_eof.lox ├── leading_dot.lox ├── literals.lox └── trailing_dot.lox ├── operator ├── add.lox ├── add_bool_nil.lox ├── add_bool_num.lox ├── add_bool_string.lox ├── add_nil_nil.lox ├── add_num_nil.lox ├── add_string_nil.lox ├── comparison.lox ├── divide.lox ├── divide_nonnum_num.lox ├── divide_num_nonnum.lox ├── equals.lox ├── equals_class.lox ├── equals_method.lox ├── greater_nonnum_num.lox ├── greater_num_nonnum.lox ├── greater_or_equal_nonnum_num.lox ├── greater_or_equal_num_nonnum.lox ├── less_nonnum_num.lox ├── less_num_nonnum.lox ├── less_or_equal_nonnum_num.lox ├── less_or_equal_num_nonnum.lox ├── multiply.lox ├── multiply_nonnum_num.lox ├── multiply_num_nonnum.lox ├── negate.lox ├── negate_nonnum.lox ├── not.lox ├── not_class.lox ├── not_equals.lox ├── subtract.lox ├── subtract_nonnum_num.lox └── subtract_num_nonnum.lox ├── precedence.lox ├── print └── missing_argument.lox ├── regression ├── 394.lox └── 40.lox ├── return ├── after_else.lox ├── after_if.lox ├── after_while.lox ├── at_top_level.lox ├── in_function.lox ├── in_method.lox └── return_nil_if_no_value.lox ├── string ├── error_after_multiline.lox ├── literals.lox ├── multiline.lox └── unterminated.lox ├── super ├── bound_method.lox ├── call_other_method.lox ├── call_same_method.lox ├── closure.lox ├── constructor.lox ├── extra_arguments.lox ├── indirectly_inherited.lox ├── missing_arguments.lox ├── no_superclass_bind.lox ├── no_superclass_call.lox ├── no_superclass_method.lox ├── parenthesized.lox ├── reassign_superclass.lox ├── super_at_top_level.lox ├── super_in_closure_in_inherited_method.lox ├── super_in_inherited_method.lox ├── super_in_top_level_function.lox ├── super_without_dot.lox ├── super_without_name.lox └── this_in_superclass_method.lox ├── this ├── closure.lox ├── nested_class.lox ├── nested_closure.lox ├── this_at_top_level.lox ├── this_in_method.lox └── this_in_top_level_function.lox ├── unexpected_character.lox ├── variable ├── collide_with_parameter.lox ├── duplicate_local.lox ├── duplicate_parameter.lox ├── early_bound.lox ├── in_middle_of_block.lox ├── in_nested_block.lox ├── local_from_method.lox ├── redeclare_global.lox ├── redefine_global.lox ├── scope_reuse_in_different_blocks.lox ├── shadow_and_local.lox ├── shadow_global.lox ├── shadow_local.lox ├── undefined_global.lox ├── undefined_local.lox ├── uninitialized.lox ├── unreached_undefined.lox ├── use_false_as_var.lox ├── use_global_in_initializer.lox ├── use_local_in_initializer.lox ├── use_nil_as_var.lox └── use_this_as_var.lox └── while ├── class_in_body.lox ├── closure_in_body.lox ├── fun_in_body.lox ├── return_closure.lox ├── return_inside.lox ├── syntax.lox └── var_in_body.lox /.gitignore: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/.gitignore -------------------------------------------------------------------------------- /CHANGELOG.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/CHANGELOG.md -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/README.md -------------------------------------------------------------------------------- /benchmark/binary_trees.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/binary_trees.lox -------------------------------------------------------------------------------- /benchmark/equality.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/equality.lox -------------------------------------------------------------------------------- /benchmark/fib.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/fib.lox -------------------------------------------------------------------------------- /benchmark/instantiation.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/instantiation.lox -------------------------------------------------------------------------------- /benchmark/invocation.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/invocation.lox -------------------------------------------------------------------------------- /benchmark/method_call.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/method_call.lox -------------------------------------------------------------------------------- /benchmark/properties.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/properties.lox -------------------------------------------------------------------------------- /benchmark/string_equality.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/string_equality.lox -------------------------------------------------------------------------------- /benchmark/trees.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/trees.lox -------------------------------------------------------------------------------- /benchmark/zoo.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/benchmark/zoo.lox -------------------------------------------------------------------------------- /doc/intro.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/doc/intro.md -------------------------------------------------------------------------------- /project.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/project.clj -------------------------------------------------------------------------------- /src/cloxure/ast.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/ast.clj -------------------------------------------------------------------------------- /src/cloxure/callable.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/callable.clj -------------------------------------------------------------------------------- /src/cloxure/core.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/core.clj -------------------------------------------------------------------------------- /src/cloxure/environment.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/environment.clj -------------------------------------------------------------------------------- /src/cloxure/error.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/error.clj -------------------------------------------------------------------------------- /src/cloxure/interpreter.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/interpreter.clj -------------------------------------------------------------------------------- /src/cloxure/parser.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/parser.clj -------------------------------------------------------------------------------- /src/cloxure/pretty.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/pretty.clj -------------------------------------------------------------------------------- /src/cloxure/resolver.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/resolver.clj -------------------------------------------------------------------------------- /src/cloxure/scanner.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/scanner.clj -------------------------------------------------------------------------------- /src/cloxure/token.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/src/cloxure/token.clj -------------------------------------------------------------------------------- /test/cloxure/core_test.clj: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/cloxure/core_test.clj -------------------------------------------------------------------------------- /test/resources/assignment/associativity.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/associativity.lox -------------------------------------------------------------------------------- /test/resources/assignment/global.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/global.lox -------------------------------------------------------------------------------- /test/resources/assignment/grouping.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/grouping.lox -------------------------------------------------------------------------------- /test/resources/assignment/infix_operator.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/infix_operator.lox -------------------------------------------------------------------------------- /test/resources/assignment/local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/local.lox -------------------------------------------------------------------------------- /test/resources/assignment/prefix_operator.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/prefix_operator.lox -------------------------------------------------------------------------------- /test/resources/assignment/syntax.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/syntax.lox -------------------------------------------------------------------------------- /test/resources/assignment/to_this.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/to_this.lox -------------------------------------------------------------------------------- /test/resources/assignment/undefined.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/assignment/undefined.lox -------------------------------------------------------------------------------- /test/resources/block/empty.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/block/empty.lox -------------------------------------------------------------------------------- /test/resources/block/scope.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/block/scope.lox -------------------------------------------------------------------------------- /test/resources/block/unclosed.lox: -------------------------------------------------------------------------------- 1 | { print "bad"; // Error at end: Expect '}' after block. -------------------------------------------------------------------------------- /test/resources/bool/equality.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/bool/equality.lox -------------------------------------------------------------------------------- /test/resources/bool/not.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/bool/not.lox -------------------------------------------------------------------------------- /test/resources/call/bool.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/call/bool.lox -------------------------------------------------------------------------------- /test/resources/call/nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/call/nil.lox -------------------------------------------------------------------------------- /test/resources/call/num.lox: -------------------------------------------------------------------------------- 1 | 123(); // expect runtime error: Can only call functions and classes. 2 | -------------------------------------------------------------------------------- /test/resources/call/object.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/call/object.lox -------------------------------------------------------------------------------- /test/resources/call/string.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/call/string.lox -------------------------------------------------------------------------------- /test/resources/class/empty.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/empty.lox -------------------------------------------------------------------------------- /test/resources/class/inherit_self.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/inherit_self.lox -------------------------------------------------------------------------------- /test/resources/class/inherited_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/inherited_method.lox -------------------------------------------------------------------------------- /test/resources/class/local_inherit_other.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/local_inherit_other.lox -------------------------------------------------------------------------------- /test/resources/class/local_inherit_self.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/local_inherit_self.lox -------------------------------------------------------------------------------- /test/resources/class/local_reference_self.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/local_reference_self.lox -------------------------------------------------------------------------------- /test/resources/class/reference_self.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/class/reference_self.lox -------------------------------------------------------------------------------- /test/resources/closure/assign_to_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/assign_to_closure.lox -------------------------------------------------------------------------------- /test/resources/closure/assign_to_shadowed_later.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/assign_to_shadowed_later.lox -------------------------------------------------------------------------------- /test/resources/closure/close_over_function_parameter.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/close_over_function_parameter.lox -------------------------------------------------------------------------------- /test/resources/closure/close_over_later_variable.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/close_over_later_variable.lox -------------------------------------------------------------------------------- /test/resources/closure/close_over_method_parameter.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/close_over_method_parameter.lox -------------------------------------------------------------------------------- /test/resources/closure/closed_closure_in_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/closed_closure_in_function.lox -------------------------------------------------------------------------------- /test/resources/closure/nested_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/nested_closure.lox -------------------------------------------------------------------------------- /test/resources/closure/open_closure_in_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/open_closure_in_function.lox -------------------------------------------------------------------------------- /test/resources/closure/reference_closure_multiple_times.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/reference_closure_multiple_times.lox -------------------------------------------------------------------------------- /test/resources/closure/reuse_closure_slot.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/reuse_closure_slot.lox -------------------------------------------------------------------------------- /test/resources/closure/shadow_closure_with_local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/shadow_closure_with_local.lox -------------------------------------------------------------------------------- /test/resources/closure/unused_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/unused_closure.lox -------------------------------------------------------------------------------- /test/resources/closure/unused_later_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/closure/unused_later_closure.lox -------------------------------------------------------------------------------- /test/resources/comments/line_at_eof.lox: -------------------------------------------------------------------------------- 1 | print "ok"; // expect: ok 2 | // comment -------------------------------------------------------------------------------- /test/resources/comments/only_line_comment.lox: -------------------------------------------------------------------------------- 1 | // comment -------------------------------------------------------------------------------- /test/resources/comments/only_line_comment_and_line.lox: -------------------------------------------------------------------------------- 1 | // comment 2 | -------------------------------------------------------------------------------- /test/resources/comments/unicode.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/comments/unicode.lox -------------------------------------------------------------------------------- /test/resources/constructor/arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/arguments.lox -------------------------------------------------------------------------------- /test/resources/constructor/call_init_early_return.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/call_init_early_return.lox -------------------------------------------------------------------------------- /test/resources/constructor/call_init_explicitly.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/call_init_explicitly.lox -------------------------------------------------------------------------------- /test/resources/constructor/default.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/default.lox -------------------------------------------------------------------------------- /test/resources/constructor/default_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/default_arguments.lox -------------------------------------------------------------------------------- /test/resources/constructor/early_return.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/early_return.lox -------------------------------------------------------------------------------- /test/resources/constructor/extra_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/extra_arguments.lox -------------------------------------------------------------------------------- /test/resources/constructor/init_not_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/init_not_method.lox -------------------------------------------------------------------------------- /test/resources/constructor/missing_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/missing_arguments.lox -------------------------------------------------------------------------------- /test/resources/constructor/return_in_nested_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/return_in_nested_function.lox -------------------------------------------------------------------------------- /test/resources/constructor/return_value.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/constructor/return_value.lox -------------------------------------------------------------------------------- /test/resources/empty_file.lox: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /test/resources/field/call_function_field.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/call_function_field.lox -------------------------------------------------------------------------------- /test/resources/field/call_nonfunction_field.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/call_nonfunction_field.lox -------------------------------------------------------------------------------- /test/resources/field/get_and_set_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_and_set_method.lox -------------------------------------------------------------------------------- /test/resources/field/get_on_bool.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_on_bool.lox -------------------------------------------------------------------------------- /test/resources/field/get_on_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_on_class.lox -------------------------------------------------------------------------------- /test/resources/field/get_on_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_on_function.lox -------------------------------------------------------------------------------- /test/resources/field/get_on_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_on_nil.lox -------------------------------------------------------------------------------- /test/resources/field/get_on_num.lox: -------------------------------------------------------------------------------- 1 | 123.foo; // expect runtime error: Only instances have properties. 2 | -------------------------------------------------------------------------------- /test/resources/field/get_on_string.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/get_on_string.lox -------------------------------------------------------------------------------- /test/resources/field/many.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/many.lox -------------------------------------------------------------------------------- /test/resources/field/method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/method.lox -------------------------------------------------------------------------------- /test/resources/field/method_binds_this.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/method_binds_this.lox -------------------------------------------------------------------------------- /test/resources/field/on_instance.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/on_instance.lox -------------------------------------------------------------------------------- /test/resources/field/set_evaluation_order.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_evaluation_order.lox -------------------------------------------------------------------------------- /test/resources/field/set_on_bool.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_on_bool.lox -------------------------------------------------------------------------------- /test/resources/field/set_on_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_on_class.lox -------------------------------------------------------------------------------- /test/resources/field/set_on_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_on_function.lox -------------------------------------------------------------------------------- /test/resources/field/set_on_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_on_nil.lox -------------------------------------------------------------------------------- /test/resources/field/set_on_num.lox: -------------------------------------------------------------------------------- 1 | 123.foo = "value"; // expect runtime error: Only instances have fields. 2 | -------------------------------------------------------------------------------- /test/resources/field/set_on_string.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/set_on_string.lox -------------------------------------------------------------------------------- /test/resources/field/undefined.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/field/undefined.lox -------------------------------------------------------------------------------- /test/resources/for/class_in_body.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/class_in_body.lox -------------------------------------------------------------------------------- /test/resources/for/closure_in_body.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/closure_in_body.lox -------------------------------------------------------------------------------- /test/resources/for/fun_in_body.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'fun': Expect expression. 2 | for (;;) fun foo() {} 3 | -------------------------------------------------------------------------------- /test/resources/for/return_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/return_closure.lox -------------------------------------------------------------------------------- /test/resources/for/return_inside.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/return_inside.lox -------------------------------------------------------------------------------- /test/resources/for/scope.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/scope.lox -------------------------------------------------------------------------------- /test/resources/for/statement_condition.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/statement_condition.lox -------------------------------------------------------------------------------- /test/resources/for/statement_increment.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/statement_increment.lox -------------------------------------------------------------------------------- /test/resources/for/statement_initializer.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/statement_initializer.lox -------------------------------------------------------------------------------- /test/resources/for/syntax.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/for/syntax.lox -------------------------------------------------------------------------------- /test/resources/for/var_in_body.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'var': Expect expression. 2 | for (;;) var foo; 3 | -------------------------------------------------------------------------------- /test/resources/function/body_must_be_block.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/body_must_be_block.lox -------------------------------------------------------------------------------- /test/resources/function/empty_body.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/empty_body.lox -------------------------------------------------------------------------------- /test/resources/function/extra_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/extra_arguments.lox -------------------------------------------------------------------------------- /test/resources/function/local_mutual_recursion.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/local_mutual_recursion.lox -------------------------------------------------------------------------------- /test/resources/function/local_recursion.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/local_recursion.lox -------------------------------------------------------------------------------- /test/resources/function/missing_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/missing_arguments.lox -------------------------------------------------------------------------------- /test/resources/function/missing_comma_in_parameters.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/missing_comma_in_parameters.lox -------------------------------------------------------------------------------- /test/resources/function/mutual_recursion.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/mutual_recursion.lox -------------------------------------------------------------------------------- /test/resources/function/parameters.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/parameters.lox -------------------------------------------------------------------------------- /test/resources/function/print.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/print.lox -------------------------------------------------------------------------------- /test/resources/function/recursion.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/recursion.lox -------------------------------------------------------------------------------- /test/resources/function/too_many_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/too_many_arguments.lox -------------------------------------------------------------------------------- /test/resources/function/too_many_parameters.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/function/too_many_parameters.lox -------------------------------------------------------------------------------- /test/resources/if/class_in_else.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/class_in_else.lox -------------------------------------------------------------------------------- /test/resources/if/class_in_then.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/class_in_then.lox -------------------------------------------------------------------------------- /test/resources/if/dangling_else.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/dangling_else.lox -------------------------------------------------------------------------------- /test/resources/if/else.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/else.lox -------------------------------------------------------------------------------- /test/resources/if/fun_in_else.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'fun': Expect expression. 2 | if (true) "ok"; else fun foo() {} 3 | -------------------------------------------------------------------------------- /test/resources/if/fun_in_then.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'fun': Expect expression. 2 | if (true) fun foo() {} 3 | -------------------------------------------------------------------------------- /test/resources/if/if.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/if.lox -------------------------------------------------------------------------------- /test/resources/if/truth.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/if/truth.lox -------------------------------------------------------------------------------- /test/resources/if/var_in_else.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'var': Expect expression. 2 | if (true) "ok"; else var foo; 3 | -------------------------------------------------------------------------------- /test/resources/if/var_in_then.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'var': Expect expression. 2 | if (true) var foo; 3 | -------------------------------------------------------------------------------- /test/resources/inheritance/constructor.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/constructor.lox -------------------------------------------------------------------------------- /test/resources/inheritance/inherit_from_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/inherit_from_function.lox -------------------------------------------------------------------------------- /test/resources/inheritance/inherit_from_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/inherit_from_nil.lox -------------------------------------------------------------------------------- /test/resources/inheritance/inherit_from_number.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/inherit_from_number.lox -------------------------------------------------------------------------------- /test/resources/inheritance/inherit_methods.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/inherit_methods.lox -------------------------------------------------------------------------------- /test/resources/inheritance/parenthesized_superclass.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/parenthesized_superclass.lox -------------------------------------------------------------------------------- /test/resources/inheritance/set_fields_from_base_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/inheritance/set_fields_from_base_class.lox -------------------------------------------------------------------------------- /test/resources/logical_operator/and.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/logical_operator/and.lox -------------------------------------------------------------------------------- /test/resources/logical_operator/and_truth.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/logical_operator/and_truth.lox -------------------------------------------------------------------------------- /test/resources/logical_operator/or.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/logical_operator/or.lox -------------------------------------------------------------------------------- /test/resources/logical_operator/or_truth.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/logical_operator/or_truth.lox -------------------------------------------------------------------------------- /test/resources/method/arity.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/arity.lox -------------------------------------------------------------------------------- /test/resources/method/empty_block.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/empty_block.lox -------------------------------------------------------------------------------- /test/resources/method/extra_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/extra_arguments.lox -------------------------------------------------------------------------------- /test/resources/method/missing_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/missing_arguments.lox -------------------------------------------------------------------------------- /test/resources/method/not_found.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/not_found.lox -------------------------------------------------------------------------------- /test/resources/method/print_bound_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/print_bound_method.lox -------------------------------------------------------------------------------- /test/resources/method/refer_to_name.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/refer_to_name.lox -------------------------------------------------------------------------------- /test/resources/method/too_many_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/too_many_arguments.lox -------------------------------------------------------------------------------- /test/resources/method/too_many_parameters.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/method/too_many_parameters.lox -------------------------------------------------------------------------------- /test/resources/nil/literal.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/nil/literal.lox -------------------------------------------------------------------------------- /test/resources/number/decimal_point_at_eof.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at end: Expect property name after '.'. 2 | 123. -------------------------------------------------------------------------------- /test/resources/number/leading_dot.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at '.': Expect expression. 2 | .123; 3 | -------------------------------------------------------------------------------- /test/resources/number/literals.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/number/literals.lox -------------------------------------------------------------------------------- /test/resources/number/trailing_dot.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at ';': Expect property name after '.'. 2 | 123.; 3 | -------------------------------------------------------------------------------- /test/resources/operator/add.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add.lox -------------------------------------------------------------------------------- /test/resources/operator/add_bool_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_bool_nil.lox -------------------------------------------------------------------------------- /test/resources/operator/add_bool_num.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_bool_num.lox -------------------------------------------------------------------------------- /test/resources/operator/add_bool_string.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_bool_string.lox -------------------------------------------------------------------------------- /test/resources/operator/add_nil_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_nil_nil.lox -------------------------------------------------------------------------------- /test/resources/operator/add_num_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_num_nil.lox -------------------------------------------------------------------------------- /test/resources/operator/add_string_nil.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/add_string_nil.lox -------------------------------------------------------------------------------- /test/resources/operator/comparison.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/comparison.lox -------------------------------------------------------------------------------- /test/resources/operator/divide.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/divide.lox -------------------------------------------------------------------------------- /test/resources/operator/divide_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" / 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/divide_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 / "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/equals.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/equals.lox -------------------------------------------------------------------------------- /test/resources/operator/equals_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/equals_class.lox -------------------------------------------------------------------------------- /test/resources/operator/equals_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/equals_method.lox -------------------------------------------------------------------------------- /test/resources/operator/greater_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" > 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/greater_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 > "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/greater_or_equal_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" >= 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/greater_or_equal_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 >= "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/less_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" < 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/less_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 < "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/less_or_equal_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" <= 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/less_or_equal_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 <= "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/multiply.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/multiply.lox -------------------------------------------------------------------------------- /test/resources/operator/multiply_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" * 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/multiply_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 * "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/negate.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/negate.lox -------------------------------------------------------------------------------- /test/resources/operator/negate_nonnum.lox: -------------------------------------------------------------------------------- 1 | -"s"; // expect runtime error: Operand must be a number. 2 | -------------------------------------------------------------------------------- /test/resources/operator/not.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/not.lox -------------------------------------------------------------------------------- /test/resources/operator/not_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/not_class.lox -------------------------------------------------------------------------------- /test/resources/operator/not_equals.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/not_equals.lox -------------------------------------------------------------------------------- /test/resources/operator/subtract.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/operator/subtract.lox -------------------------------------------------------------------------------- /test/resources/operator/subtract_nonnum_num.lox: -------------------------------------------------------------------------------- 1 | "1" - 1; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/operator/subtract_num_nonnum.lox: -------------------------------------------------------------------------------- 1 | 1 - "1"; // expect runtime error: Operands must be numbers. 2 | -------------------------------------------------------------------------------- /test/resources/precedence.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/precedence.lox -------------------------------------------------------------------------------- /test/resources/print/missing_argument.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at ';': Expect expression. 2 | print; 3 | -------------------------------------------------------------------------------- /test/resources/regression/394.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/regression/394.lox -------------------------------------------------------------------------------- /test/resources/regression/40.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/regression/40.lox -------------------------------------------------------------------------------- /test/resources/return/after_else.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/return/after_else.lox -------------------------------------------------------------------------------- /test/resources/return/after_if.lox: -------------------------------------------------------------------------------- 1 | fun f() { 2 | if (true) return "ok"; 3 | } 4 | 5 | print f(); // expect: ok 6 | -------------------------------------------------------------------------------- /test/resources/return/after_while.lox: -------------------------------------------------------------------------------- 1 | fun f() { 2 | while (true) return "ok"; 3 | } 4 | 5 | print f(); // expect: ok 6 | -------------------------------------------------------------------------------- /test/resources/return/at_top_level.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/return/at_top_level.lox -------------------------------------------------------------------------------- /test/resources/return/in_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/return/in_function.lox -------------------------------------------------------------------------------- /test/resources/return/in_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/return/in_method.lox -------------------------------------------------------------------------------- /test/resources/return/return_nil_if_no_value.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/return/return_nil_if_no_value.lox -------------------------------------------------------------------------------- /test/resources/string/error_after_multiline.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/string/error_after_multiline.lox -------------------------------------------------------------------------------- /test/resources/string/literals.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/string/literals.lox -------------------------------------------------------------------------------- /test/resources/string/multiline.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/string/multiline.lox -------------------------------------------------------------------------------- /test/resources/string/unterminated.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/string/unterminated.lox -------------------------------------------------------------------------------- /test/resources/super/bound_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/bound_method.lox -------------------------------------------------------------------------------- /test/resources/super/call_other_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/call_other_method.lox -------------------------------------------------------------------------------- /test/resources/super/call_same_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/call_same_method.lox -------------------------------------------------------------------------------- /test/resources/super/closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/closure.lox -------------------------------------------------------------------------------- /test/resources/super/constructor.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/constructor.lox -------------------------------------------------------------------------------- /test/resources/super/extra_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/extra_arguments.lox -------------------------------------------------------------------------------- /test/resources/super/indirectly_inherited.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/indirectly_inherited.lox -------------------------------------------------------------------------------- /test/resources/super/missing_arguments.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/missing_arguments.lox -------------------------------------------------------------------------------- /test/resources/super/no_superclass_bind.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/no_superclass_bind.lox -------------------------------------------------------------------------------- /test/resources/super/no_superclass_call.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/no_superclass_call.lox -------------------------------------------------------------------------------- /test/resources/super/no_superclass_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/no_superclass_method.lox -------------------------------------------------------------------------------- /test/resources/super/parenthesized.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/parenthesized.lox -------------------------------------------------------------------------------- /test/resources/super/reassign_superclass.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/reassign_superclass.lox -------------------------------------------------------------------------------- /test/resources/super/super_at_top_level.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_at_top_level.lox -------------------------------------------------------------------------------- /test/resources/super/super_in_closure_in_inherited_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_in_closure_in_inherited_method.lox -------------------------------------------------------------------------------- /test/resources/super/super_in_inherited_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_in_inherited_method.lox -------------------------------------------------------------------------------- /test/resources/super/super_in_top_level_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_in_top_level_function.lox -------------------------------------------------------------------------------- /test/resources/super/super_without_dot.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_without_dot.lox -------------------------------------------------------------------------------- /test/resources/super/super_without_name.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/super_without_name.lox -------------------------------------------------------------------------------- /test/resources/super/this_in_superclass_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/super/this_in_superclass_method.lox -------------------------------------------------------------------------------- /test/resources/this/closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/closure.lox -------------------------------------------------------------------------------- /test/resources/this/nested_class.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/nested_class.lox -------------------------------------------------------------------------------- /test/resources/this/nested_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/nested_closure.lox -------------------------------------------------------------------------------- /test/resources/this/this_at_top_level.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/this_at_top_level.lox -------------------------------------------------------------------------------- /test/resources/this/this_in_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/this_in_method.lox -------------------------------------------------------------------------------- /test/resources/this/this_in_top_level_function.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/this/this_in_top_level_function.lox -------------------------------------------------------------------------------- /test/resources/unexpected_character.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/unexpected_character.lox -------------------------------------------------------------------------------- /test/resources/variable/collide_with_parameter.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/collide_with_parameter.lox -------------------------------------------------------------------------------- /test/resources/variable/duplicate_local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/duplicate_local.lox -------------------------------------------------------------------------------- /test/resources/variable/duplicate_parameter.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/duplicate_parameter.lox -------------------------------------------------------------------------------- /test/resources/variable/early_bound.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/early_bound.lox -------------------------------------------------------------------------------- /test/resources/variable/in_middle_of_block.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/in_middle_of_block.lox -------------------------------------------------------------------------------- /test/resources/variable/in_nested_block.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/in_nested_block.lox -------------------------------------------------------------------------------- /test/resources/variable/local_from_method.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/local_from_method.lox -------------------------------------------------------------------------------- /test/resources/variable/redeclare_global.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/redeclare_global.lox -------------------------------------------------------------------------------- /test/resources/variable/redefine_global.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/redefine_global.lox -------------------------------------------------------------------------------- /test/resources/variable/scope_reuse_in_different_blocks.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/scope_reuse_in_different_blocks.lox -------------------------------------------------------------------------------- /test/resources/variable/shadow_and_local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/shadow_and_local.lox -------------------------------------------------------------------------------- /test/resources/variable/shadow_global.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/shadow_global.lox -------------------------------------------------------------------------------- /test/resources/variable/shadow_local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/shadow_local.lox -------------------------------------------------------------------------------- /test/resources/variable/undefined_global.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/undefined_global.lox -------------------------------------------------------------------------------- /test/resources/variable/undefined_local.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/undefined_local.lox -------------------------------------------------------------------------------- /test/resources/variable/uninitialized.lox: -------------------------------------------------------------------------------- 1 | var a; 2 | print a; // expect: nil 3 | -------------------------------------------------------------------------------- /test/resources/variable/unreached_undefined.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/unreached_undefined.lox -------------------------------------------------------------------------------- /test/resources/variable/use_false_as_var.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/use_false_as_var.lox -------------------------------------------------------------------------------- /test/resources/variable/use_global_in_initializer.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/use_global_in_initializer.lox -------------------------------------------------------------------------------- /test/resources/variable/use_local_in_initializer.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/use_local_in_initializer.lox -------------------------------------------------------------------------------- /test/resources/variable/use_nil_as_var.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/use_nil_as_var.lox -------------------------------------------------------------------------------- /test/resources/variable/use_this_as_var.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/variable/use_this_as_var.lox -------------------------------------------------------------------------------- /test/resources/while/class_in_body.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/while/class_in_body.lox -------------------------------------------------------------------------------- /test/resources/while/closure_in_body.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/while/closure_in_body.lox -------------------------------------------------------------------------------- /test/resources/while/fun_in_body.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'fun': Expect expression. 2 | while (true) fun foo() {} 3 | -------------------------------------------------------------------------------- /test/resources/while/return_closure.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/while/return_closure.lox -------------------------------------------------------------------------------- /test/resources/while/return_inside.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/while/return_inside.lox -------------------------------------------------------------------------------- /test/resources/while/syntax.lox: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/ceronman/cloxure/HEAD/test/resources/while/syntax.lox -------------------------------------------------------------------------------- /test/resources/while/var_in_body.lox: -------------------------------------------------------------------------------- 1 | // [line 2] Error at 'var': Expect expression. 2 | while (true) var foo; 3 | --------------------------------------------------------------------------------