├── .gitattributes ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── grammar.ebnf ├── scope_access ├── src ├── ast │ ├── mod.rs │ └── tests.rs ├── generator.rs ├── main.rs └── scanner.rs └── test ├── LICENSE ├── README.md ├── stage_1 ├── invalid │ ├── missing_paren.c │ ├── missing_retval.c │ ├── no_brace.c │ ├── no_semicolon.c │ ├── no_space.c │ └── wrong_case.c └── valid │ ├── multi_digit.c │ ├── newlines.c │ ├── no_newlines.c │ ├── return_0.c │ ├── return_2.c │ └── spaces.c ├── stage_2 ├── invalid │ ├── missing_const.c │ ├── missing_semicolon.c │ ├── nested_missing_const.c │ └── wrong_order.c └── valid │ ├── bitwise.c │ ├── bitwise_zero.c │ ├── neg.c │ ├── nested_ops.c │ ├── nested_ops_2.c │ ├── not_five.c │ └── not_zero.c ├── stage_3 ├── invalid │ ├── malformed_paren.c │ ├── missing_first_op.c │ ├── missing_second_op.c │ └── no_semicolon.c └── valid │ ├── add.c │ ├── associativity.c │ ├── associativity_2.c │ ├── div.c │ ├── mult.c │ ├── parens.c │ ├── precedence.c │ ├── sub.c │ ├── sub_neg.c │ ├── unop_add.c │ └── unop_parens.c ├── stage_4 ├── invalid │ ├── missing_first_op.c │ ├── missing_mid_op.c │ ├── missing_second_op.c │ ├── missing_semicolon.c │ └── split_le.c └── valid │ ├── and_false.c │ ├── and_true.c │ ├── eq_false.c │ ├── eq_true.c │ ├── ge_false.c │ ├── ge_true.c │ ├── gt_false.c │ ├── gt_true.c │ ├── le_false.c │ ├── le_true.c │ ├── lt_false.c │ ├── lt_true.c │ ├── ne_false.c │ ├── ne_true.c │ ├── or_false.c │ ├── or_true.c │ ├── precedence.c │ ├── precedence_2.c │ ├── precedence_3.c │ └── precedence_4.c ├── stage_5 ├── invalid │ ├── redefine.c │ ├── syntax_err_bad_decl.c │ ├── syntax_err_bad_decl_2.c │ ├── syntax_err_bad_lvalue.c │ ├── syntax_err_bad_lvalue_2.c │ ├── syntax_err_no_semicolon.c │ ├── undeclared_var.c │ └── var_declared_late.c └── valid │ ├── assign.c │ ├── assign_val.c │ ├── compund_assignment.c │ ├── exp_return_val.c │ ├── initialize.c │ ├── missing_return.c │ ├── multiple_vars.c │ ├── no_initialize.c │ ├── refer.c │ └── unused_exp.c ├── stage_6 ├── invalid │ ├── expression │ │ ├── incomplete_ternary.c │ │ ├── malformed_ternary.c │ │ ├── malformed_ternary_2.c │ │ └── ternary_assign.c │ └── statement │ │ ├── declare_statement.c │ │ ├── if_assignment.c │ │ └── mismatched_nesting.c └── valid │ ├── expression │ ├── assign_ternary.c │ ├── multiple_ternary.c │ ├── nested_ternary.c │ ├── nested_ternary_2.c │ ├── rh_assignment.c │ └── ternary.c │ └── statement │ ├── else.c │ ├── if_nested.c │ ├── if_nested_2.c │ ├── if_nested_3.c │ ├── if_nested_4.c │ ├── if_nested_5.c │ ├── if_not_taken.c │ ├── if_taken.c │ └── multiple_if.c ├── stage_7 ├── invalid │ ├── double_define.c │ ├── out_of_scope.c │ ├── syntax_err_extra_brace.c │ └── syntax_err_missing_brace.c └── valid │ ├── comparison.c │ ├── consecutive_blocks.c │ ├── consecutive_declarations.c │ ├── declare_after_block.c │ ├── declare_block.c │ ├── declare_late.c │ ├── multi_nesting.c │ ├── nested_if.c │ └── nested_scope.c ├── stage_8 ├── invalid │ ├── break_not_in_loop.c │ ├── continue_not_in_loop.c │ ├── out_of_scope.c │ ├── out_of_scope_do_while.c │ ├── syntax_err_do_no_semicolon.c │ ├── syntax_err_empty_clause.c │ ├── syntax_err_paren_mismatch.c │ ├── syntax_err_statement_in_condition.c │ ├── syntax_err_too_few_for_clauses.c │ └── syntax_err_too_many_for_clauses.c └── valid │ ├── break.c │ ├── continue.c │ ├── continue_empty_post.c │ ├── do_while.c │ ├── empty_expression.c │ ├── for.c │ ├── for_decl.c │ ├── for_empty.c │ ├── for_nested_scope.c │ ├── for_variable_shadow.c │ ├── nested_break.c │ ├── nested_while.c │ ├── return_in_while.c │ ├── scope_access.c │ ├── while_multi_statement.c │ └── while_single_statement.c ├── stage_9 ├── invalid │ ├── bad_arg.c │ ├── declaration_mismatch.c │ ├── declaration_mismatch_2.c │ ├── redefine_function.c │ ├── redefine_variable.c │ └── too_many_args.c └── valid │ ├── expression_args.c │ ├── fib.c │ ├── forward_decl.c │ ├── forward_decl_args.c │ ├── forward_decl_multi_arg.c │ ├── fun_in_expr.c │ ├── hello_world.c │ ├── later_decl.c │ ├── multi_arg.c │ ├── mutual_recursion.c │ ├── no_arg.c │ ├── precedence.c │ ├── rename_function_param.c │ └── single_arg.c └── test_compiler.sh /.gitattributes: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/.gitattributes -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | **/*.rs.bk 3 | *.s 4 | *.exe 5 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/Cargo.lock -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/Cargo.toml -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/LICENSE -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/README.md -------------------------------------------------------------------------------- /grammar.ebnf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/grammar.ebnf -------------------------------------------------------------------------------- /scope_access: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/scope_access -------------------------------------------------------------------------------- /src/ast/mod.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/src/ast/mod.rs -------------------------------------------------------------------------------- /src/ast/tests.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/src/ast/tests.rs -------------------------------------------------------------------------------- /src/generator.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/src/generator.rs -------------------------------------------------------------------------------- /src/main.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/src/main.rs -------------------------------------------------------------------------------- /src/scanner.rs: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/src/scanner.rs -------------------------------------------------------------------------------- /test/LICENSE: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/LICENSE -------------------------------------------------------------------------------- /test/README.md: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/README.md -------------------------------------------------------------------------------- /test/stage_1/invalid/missing_paren.c: -------------------------------------------------------------------------------- 1 | int main( { 2 | return 0; 3 | } -------------------------------------------------------------------------------- /test/stage_1/invalid/missing_retval.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return; 3 | } -------------------------------------------------------------------------------- /test/stage_1/invalid/no_brace.c: -------------------------------------------------------------------------------- 1 | int main { 2 | return 0; 3 | -------------------------------------------------------------------------------- /test/stage_1/invalid/no_semicolon.c: -------------------------------------------------------------------------------- 1 | int main { 2 | return 0 3 | } -------------------------------------------------------------------------------- /test/stage_1/invalid/no_space.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return0; 3 | } -------------------------------------------------------------------------------- /test/stage_1/invalid/wrong_case.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | RETURN 0; 3 | } -------------------------------------------------------------------------------- /test/stage_1/valid/multi_digit.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 100; 3 | } -------------------------------------------------------------------------------- /test/stage_1/valid/newlines.c: -------------------------------------------------------------------------------- 1 | 2 | int 3 | main 4 | ( 5 | ) 6 | { 7 | return 8 | 0 9 | ; 10 | } -------------------------------------------------------------------------------- /test/stage_1/valid/no_newlines.c: -------------------------------------------------------------------------------- 1 | int main(){return 0;} -------------------------------------------------------------------------------- /test/stage_1/valid/return_0.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 0; 3 | } 4 | -------------------------------------------------------------------------------- /test/stage_1/valid/return_2.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2; 3 | } -------------------------------------------------------------------------------- /test/stage_1/valid/spaces.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_1/valid/spaces.c -------------------------------------------------------------------------------- /test/stage_2/invalid/missing_const.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !; 3 | } -------------------------------------------------------------------------------- /test/stage_2/invalid/missing_semicolon.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !5 3 | } -------------------------------------------------------------------------------- /test/stage_2/invalid/nested_missing_const.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !~; 3 | } -------------------------------------------------------------------------------- /test/stage_2/invalid/wrong_order.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 4-; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/bitwise.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !12; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/bitwise_zero.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return ~0; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/neg.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return -5; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/nested_ops.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !-3; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/nested_ops_2.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return -~0; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/not_five.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !5; 3 | } -------------------------------------------------------------------------------- /test/stage_2/valid/not_zero.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return !0; 3 | } -------------------------------------------------------------------------------- /test/stage_3/invalid/malformed_paren.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 (- 3); 3 | } -------------------------------------------------------------------------------- /test/stage_3/invalid/missing_first_op.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return /3; 3 | } -------------------------------------------------------------------------------- /test/stage_3/invalid/missing_second_op.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 + ; 3 | } -------------------------------------------------------------------------------- /test/stage_3/invalid/no_semicolon.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2*2 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/add.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 + 2; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/associativity.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_3/valid/associativity.c -------------------------------------------------------------------------------- /test/stage_3/valid/associativity_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_3/valid/associativity_2.c -------------------------------------------------------------------------------- /test/stage_3/valid/div.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 4 / 2; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/mult.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 * 3; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/parens.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 * (3 + 4); 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/precedence.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 + 3 * 4; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/sub.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 - 2; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/sub_neg.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2- -1; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/unop_add.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return ~2 + 3; 3 | } -------------------------------------------------------------------------------- /test/stage_3/valid/unop_parens.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return ~(1 + 1); 3 | } -------------------------------------------------------------------------------- /test/stage_4/invalid/missing_first_op.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return <= 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/invalid/missing_mid_op.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 < > 3; 3 | } -------------------------------------------------------------------------------- /test/stage_4/invalid/missing_second_op.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 && 3 | } -------------------------------------------------------------------------------- /test/stage_4/invalid/missing_semicolon.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 || 2 3 | } -------------------------------------------------------------------------------- /test/stage_4/invalid/split_le.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 < = 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/and_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 && 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/and_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 && -1; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/eq_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 == 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/eq_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 == 1; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/ge_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 >= 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/ge_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 >= 1; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/gt_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 > 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/gt_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 > 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/le_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 <= -1; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/le_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 0 <= 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/lt_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 2 < 1; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/lt_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 < 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/ne_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 0 != 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/ne_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return -1 != -2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/or_false.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 0 || 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/or_true.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 || 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/precedence.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 || 0 && 2; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/precedence_2.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return (1 || 0) && 0; 3 | } -------------------------------------------------------------------------------- /test/stage_4/valid/precedence_3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_4/valid/precedence_3.c -------------------------------------------------------------------------------- /test/stage_4/valid/precedence_4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_4/valid/precedence_4.c -------------------------------------------------------------------------------- /test/stage_5/invalid/redefine.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/redefine.c -------------------------------------------------------------------------------- /test/stage_5/invalid/syntax_err_bad_decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/syntax_err_bad_decl.c -------------------------------------------------------------------------------- /test/stage_5/invalid/syntax_err_bad_decl_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/syntax_err_bad_decl_2.c -------------------------------------------------------------------------------- /test/stage_5/invalid/syntax_err_bad_lvalue.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/syntax_err_bad_lvalue.c -------------------------------------------------------------------------------- /test/stage_5/invalid/syntax_err_bad_lvalue_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/syntax_err_bad_lvalue_2.c -------------------------------------------------------------------------------- /test/stage_5/invalid/syntax_err_no_semicolon.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/syntax_err_no_semicolon.c -------------------------------------------------------------------------------- /test/stage_5/invalid/undeclared_var.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return a; 3 | } -------------------------------------------------------------------------------- /test/stage_5/invalid/var_declared_late.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/invalid/var_declared_late.c -------------------------------------------------------------------------------- /test/stage_5/valid/assign.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/assign.c -------------------------------------------------------------------------------- /test/stage_5/valid/assign_val.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/assign_val.c -------------------------------------------------------------------------------- /test/stage_5/valid/compund_assignment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/compund_assignment.c -------------------------------------------------------------------------------- /test/stage_5/valid/exp_return_val.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/exp_return_val.c -------------------------------------------------------------------------------- /test/stage_5/valid/initialize.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/initialize.c -------------------------------------------------------------------------------- /test/stage_5/valid/missing_return.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | 3 | } -------------------------------------------------------------------------------- /test/stage_5/valid/multiple_vars.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/multiple_vars.c -------------------------------------------------------------------------------- /test/stage_5/valid/no_initialize.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/no_initialize.c -------------------------------------------------------------------------------- /test/stage_5/valid/refer.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/refer.c -------------------------------------------------------------------------------- /test/stage_5/valid/unused_exp.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_5/valid/unused_exp.c -------------------------------------------------------------------------------- /test/stage_6/invalid/expression/incomplete_ternary.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | return 1 ? 2; 3 | } -------------------------------------------------------------------------------- /test/stage_6/invalid/expression/malformed_ternary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/expression/malformed_ternary.c -------------------------------------------------------------------------------- /test/stage_6/invalid/expression/malformed_ternary_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/expression/malformed_ternary_2.c -------------------------------------------------------------------------------- /test/stage_6/invalid/expression/ternary_assign.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/expression/ternary_assign.c -------------------------------------------------------------------------------- /test/stage_6/invalid/statement/declare_statement.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/statement/declare_statement.c -------------------------------------------------------------------------------- /test/stage_6/invalid/statement/if_assignment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/statement/if_assignment.c -------------------------------------------------------------------------------- /test/stage_6/invalid/statement/mismatched_nesting.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/invalid/statement/mismatched_nesting.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/assign_ternary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/assign_ternary.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/multiple_ternary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/multiple_ternary.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/nested_ternary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/nested_ternary.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/nested_ternary_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/nested_ternary_2.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/rh_assignment.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/rh_assignment.c -------------------------------------------------------------------------------- /test/stage_6/valid/expression/ternary.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/expression/ternary.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/else.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/else.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_nested.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_nested.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_nested_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_nested_2.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_nested_3.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_nested_3.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_nested_4.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_nested_4.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_nested_5.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_nested_5.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_not_taken.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_not_taken.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/if_taken.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/if_taken.c -------------------------------------------------------------------------------- /test/stage_6/valid/statement/multiple_if.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_6/valid/statement/multiple_if.c -------------------------------------------------------------------------------- /test/stage_7/invalid/double_define.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/invalid/double_define.c -------------------------------------------------------------------------------- /test/stage_7/invalid/out_of_scope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/invalid/out_of_scope.c -------------------------------------------------------------------------------- /test/stage_7/invalid/syntax_err_extra_brace.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/invalid/syntax_err_extra_brace.c -------------------------------------------------------------------------------- /test/stage_7/invalid/syntax_err_missing_brace.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/invalid/syntax_err_missing_brace.c -------------------------------------------------------------------------------- /test/stage_7/valid/comparison.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/comparison.c -------------------------------------------------------------------------------- /test/stage_7/valid/consecutive_blocks.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/consecutive_blocks.c -------------------------------------------------------------------------------- /test/stage_7/valid/consecutive_declarations.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/consecutive_declarations.c -------------------------------------------------------------------------------- /test/stage_7/valid/declare_after_block.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/declare_after_block.c -------------------------------------------------------------------------------- /test/stage_7/valid/declare_block.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/declare_block.c -------------------------------------------------------------------------------- /test/stage_7/valid/declare_late.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/declare_late.c -------------------------------------------------------------------------------- /test/stage_7/valid/multi_nesting.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/multi_nesting.c -------------------------------------------------------------------------------- /test/stage_7/valid/nested_if.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/nested_if.c -------------------------------------------------------------------------------- /test/stage_7/valid/nested_scope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_7/valid/nested_scope.c -------------------------------------------------------------------------------- /test/stage_8/invalid/break_not_in_loop.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | break; 3 | } -------------------------------------------------------------------------------- /test/stage_8/invalid/continue_not_in_loop.c: -------------------------------------------------------------------------------- 1 | int main() { 2 | continue; 3 | } -------------------------------------------------------------------------------- /test/stage_8/invalid/out_of_scope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/out_of_scope.c -------------------------------------------------------------------------------- /test/stage_8/invalid/out_of_scope_do_while.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/out_of_scope_do_while.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_do_no_semicolon.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_do_no_semicolon.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_empty_clause.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_empty_clause.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_paren_mismatch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_paren_mismatch.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_statement_in_condition.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_statement_in_condition.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_too_few_for_clauses.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_too_few_for_clauses.c -------------------------------------------------------------------------------- /test/stage_8/invalid/syntax_err_too_many_for_clauses.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/invalid/syntax_err_too_many_for_clauses.c -------------------------------------------------------------------------------- /test/stage_8/valid/break.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/break.c -------------------------------------------------------------------------------- /test/stage_8/valid/continue.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/continue.c -------------------------------------------------------------------------------- /test/stage_8/valid/continue_empty_post.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/continue_empty_post.c -------------------------------------------------------------------------------- /test/stage_8/valid/do_while.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/do_while.c -------------------------------------------------------------------------------- /test/stage_8/valid/empty_expression.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/empty_expression.c -------------------------------------------------------------------------------- /test/stage_8/valid/for.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/for.c -------------------------------------------------------------------------------- /test/stage_8/valid/for_decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/for_decl.c -------------------------------------------------------------------------------- /test/stage_8/valid/for_empty.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/for_empty.c -------------------------------------------------------------------------------- /test/stage_8/valid/for_nested_scope.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/for_nested_scope.c -------------------------------------------------------------------------------- /test/stage_8/valid/for_variable_shadow.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/for_variable_shadow.c -------------------------------------------------------------------------------- /test/stage_8/valid/nested_break.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/nested_break.c -------------------------------------------------------------------------------- /test/stage_8/valid/nested_while.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/nested_while.c -------------------------------------------------------------------------------- /test/stage_8/valid/return_in_while.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/return_in_while.c -------------------------------------------------------------------------------- /test/stage_8/valid/scope_access.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/scope_access.c -------------------------------------------------------------------------------- /test/stage_8/valid/while_multi_statement.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/while_multi_statement.c -------------------------------------------------------------------------------- /test/stage_8/valid/while_single_statement.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_8/valid/while_single_statement.c -------------------------------------------------------------------------------- /test/stage_9/invalid/bad_arg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/bad_arg.c -------------------------------------------------------------------------------- /test/stage_9/invalid/declaration_mismatch.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/declaration_mismatch.c -------------------------------------------------------------------------------- /test/stage_9/invalid/declaration_mismatch_2.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/declaration_mismatch_2.c -------------------------------------------------------------------------------- /test/stage_9/invalid/redefine_function.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/redefine_function.c -------------------------------------------------------------------------------- /test/stage_9/invalid/redefine_variable.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/redefine_variable.c -------------------------------------------------------------------------------- /test/stage_9/invalid/too_many_args.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/invalid/too_many_args.c -------------------------------------------------------------------------------- /test/stage_9/valid/expression_args.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/expression_args.c -------------------------------------------------------------------------------- /test/stage_9/valid/fib.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/fib.c -------------------------------------------------------------------------------- /test/stage_9/valid/forward_decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/forward_decl.c -------------------------------------------------------------------------------- /test/stage_9/valid/forward_decl_args.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/forward_decl_args.c -------------------------------------------------------------------------------- /test/stage_9/valid/forward_decl_multi_arg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/forward_decl_multi_arg.c -------------------------------------------------------------------------------- /test/stage_9/valid/fun_in_expr.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/fun_in_expr.c -------------------------------------------------------------------------------- /test/stage_9/valid/hello_world.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/hello_world.c -------------------------------------------------------------------------------- /test/stage_9/valid/later_decl.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/later_decl.c -------------------------------------------------------------------------------- /test/stage_9/valid/multi_arg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/multi_arg.c -------------------------------------------------------------------------------- /test/stage_9/valid/mutual_recursion.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/mutual_recursion.c -------------------------------------------------------------------------------- /test/stage_9/valid/no_arg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/no_arg.c -------------------------------------------------------------------------------- /test/stage_9/valid/precedence.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/precedence.c -------------------------------------------------------------------------------- /test/stage_9/valid/rename_function_param.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/rename_function_param.c -------------------------------------------------------------------------------- /test/stage_9/valid/single_arg.c: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/stage_9/valid/single_arg.c -------------------------------------------------------------------------------- /test/test_compiler.sh: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lukewilson2002/oxc/HEAD/test/test_compiler.sh --------------------------------------------------------------------------------