├── .editorconfig ├── .github ├── ISSUE_TEMPLATE │ └── broken_syntax_highlighting.md ├── PULL_REQUEST_TEMPLATE │ └── simple_pull_request.md └── workflows │ └── continuous-integration.yml ├── .gitignore ├── .vscode ├── launch.json └── tasks.json ├── LICENSE ├── README.md ├── build ├── build.ts ├── helpers.ts ├── tsconfig.json └── types.ts ├── grammars ├── Ink-Visual-Studio.tmLanguage ├── Ink.YAML-tmLanguage └── Ink.tmLanguage ├── package-lock.json ├── package.json ├── tests ├── cases │ ├── bindings │ │ ├── external_binding.ink │ │ ├── game_ink_back_and_forth.ink │ │ └── variable_observer.ink │ ├── builtins │ │ ├── floor_ceiling_and_casts.ink │ │ ├── read_count_across_callstack.ink │ │ ├── read_count_across_threads.ink │ │ ├── read_count_dot_separated_path.ink │ │ ├── read_count_variable_target.ink │ │ ├── turns.ink │ │ ├── turns_since.ink │ │ ├── turns_since_nested.ink │ │ ├── turns_since_with_variable_target.ink │ │ └── visit_counts_when_choosing.ink │ ├── callstack │ │ ├── call_stack_evaluation.ink │ │ └── clean_callstack_reset_on_path_choice.ink │ ├── choices │ │ ├── choice_count.ink │ │ ├── choice_diverts_to_done.ink │ │ ├── choice_thread_forking.ink │ │ ├── choice_with_brackets_only.ink │ │ ├── conditional_choices.ink │ │ ├── default_choices.ink │ │ ├── default_simple_gather.ink │ │ ├── fallback_choice_on_thread.ink │ │ ├── gather_choice_same_line.ink │ │ ├── has_read_on_choice.ink │ │ ├── logic_in_choices.ink │ │ ├── non_text_in_choice_inner_content.ink │ │ ├── once_only_choices_can_link_back_to_self.ink │ │ ├── once_only_choices_with_own_content.ink │ │ ├── should_not_gather_due_to_choice.ink │ │ ├── sticky_choices_stay_sticky.ink │ │ └── various_default_choices.ink │ ├── conditions │ │ └── conditionals.ink │ ├── diverts │ │ ├── basic_tunnel.ink │ │ ├── compare_divert_targets.ink │ │ ├── complex_tunnels.ink │ │ ├── divert_in_conditional.ink │ │ ├── divert_targets_with_parameters.ink │ │ ├── divert_to_weave_points.ink │ │ ├── done_stops_thread.ink │ │ ├── path_to_self.ink │ │ ├── same_line_divert_is_inline.ink │ │ ├── tunnel_onwards_after_tunnel.ink │ │ ├── tunnel_onwards_divert_after_with_arg.ink │ │ ├── tunnel_onwards_divert_override.ink │ │ ├── tunnel_onwards_with_param_default_choice.ink │ │ └── tunnel_vs_thread_behaviour.ink │ ├── evaluation │ │ ├── arithmetic.ink │ │ ├── basic_string_literals.ink │ │ └── evaluating_function_variable_state_bug.ink │ ├── extra │ │ ├── gather_tunnel_threads.ink │ │ ├── knot_stitch_function_declaration.ink │ │ ├── tags.ink │ │ ├── todo.ink │ │ └── variable_declarations.ink │ └── glue │ │ └── simple_glue.ink ├── tsonfig.json └── visual-inspection │ ├── evaluation │ ├── evaluating_ink_functions_from_game.ink │ ├── evaluating_ink_functions_from_game_2.ink │ ├── evaluation_stack_leaks.ink │ ├── factorial_by_reference.ink │ ├── factorial_recursive.ink │ ├── increment.ink │ └── literal_unary.ink │ ├── lists │ ├── empty_list_origin.ink │ ├── empty_list_origin_after_assignment.ink │ ├── list_basic_operations.ink │ ├── list_mixed_items.ink │ ├── list_random.ink │ ├── list_range.ink │ ├── list_save_load.ink │ └── more_list_operations.ink │ ├── logic │ ├── logic_lines_with_newlines.ink │ ├── multiline_logic_with_glue.ink │ ├── nested_pass_by_reference.ink │ └── print_num.ink │ ├── misc │ ├── empty.ink │ ├── end.ink │ ├── end2.ink │ ├── end_of_content.ink │ ├── escape_character.ink │ ├── hello_world.ink │ ├── identifiers_can_start_with_number.ink │ ├── include.ink │ ├── includes │ │ ├── included_file.ink │ │ ├── included_file_2.ink │ │ ├── included_file_3.ink │ │ └── included_file_4.ink │ ├── nested_include.ink │ ├── quote_character_significance.ink │ └── whitespace.ink │ ├── newlines │ ├── newline_at_start_of_multiline_conditional.ink │ ├── newline_consistency_1.ink │ ├── newline_consistency_2.ink │ ├── newline_consistency_3.ink │ ├── newlines_trimming_with_func_external_fallback.ink │ └── newlines_with_string_eval.ink │ ├── sequences │ ├── all_sequences_types.ink │ ├── blanks_in_inline_sequences.ink │ ├── empty_sequence_content.ink │ ├── gather_read_count_with_initial_sequence.ink │ ├── leading_newline_multiline_sequence.ink │ └── shuffle_stack_muddying.ink │ ├── stories │ ├── LD41 Emoji.ink │ ├── The Intercept.ink │ ├── extra_knots.ink │ ├── include.ink │ ├── include_2.ink │ ├── lists.ink │ └── test.ink │ ├── strings │ ├── string_constants.ink │ ├── string_contains.ink │ ├── string_type_coercion.ink │ └── strings_in_choices.ink │ ├── threads │ ├── multi_thread.ink │ ├── thread_done.ink │ ├── thread_in_logic.ink │ └── top_flow_terminator_should_not_kill_thread_choices.ink │ ├── variables │ ├── const.ink │ ├── multiple_constant_references.ink │ ├── set_non_existant_variable.ink │ ├── temp_global_conflict.ink │ ├── temp_not_found.ink │ ├── temp_usage_in_options.ink │ ├── temporaries_at_global_scope.ink │ ├── variable_declaration_in_conditional.ink │ ├── variable_divert_target.ink │ ├── variable_get_set_api.ink │ ├── variable_pointer_ref_from_knot.ink │ ├── variable_swap_recurse.ink │ ├── warn_variable_not_found_1.ink │ └── warn_variable_not_found_2.ink │ ├── weaves │ ├── conditional_choice_in_weave.ink │ ├── conditional_choice_in_weave_2.ink │ ├── unbalanced_weave_indentation.ink │ ├── weave_gathers.ink │ ├── weave_options.ink │ └── weave_within_sequence.ink │ └── writing_with_ink │ ├── part_1_1.ink │ ├── part_1_2.ink │ ├── part_1_3.ink │ ├── part_1_4.ink │ ├── part_1_5.ink │ ├── part_1_6.ink │ ├── part_1_7.ink │ ├── part_1_8.ink │ ├── part_1_9.ink │ ├── part_2_1.ink │ ├── part_2_2.ink │ ├── part_2_3.ink │ ├── part_3_1.ink │ ├── part_3_2.ink │ ├── part_3_3.ink │ ├── part_3_4.ink │ ├── part_3_5.ink │ ├── part_3_6.ink │ ├── part_4_1.ink │ ├── part_4_2.ink │ ├── part_5_1.ink │ ├── part_5_2.ink │ ├── part_5_3.ink │ ├── part_5_4.ink │ ├── part_5_5.ink │ ├── part_5_6.ink │ ├── part_5_7.ink │ └── part_5_8.ink └── tslint.json /.editorconfig: -------------------------------------------------------------------------------- 1 | 2 | root = true 3 | 4 | [*] 5 | end_of_line = lf 6 | insert_final_newline = true 7 | charset = utf-8 8 | 9 | 10 | [*.{js,ts}] 11 | indent_style = space 12 | indent_size = 2 13 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/broken_syntax_highlighting.md: -------------------------------------------------------------------------------- 1 | --- 2 | name: Broken syntax highlighting 3 | about: Create a report to help us improve the grammar 4 | --- 5 | 6 | ## Describe where the syntax highlighting breaks 7 | 8 | 9 | ## Ink snippet 10 | 14 | ``` 15 | 16 | ``` 17 | 18 | ## Environment 19 | - OS: 20 | - Editor (Version): 21 | 22 | 23 | 24 | 28 | - Grammar version: 29 | 30 | - Editor extension: 31 | 35 | 36 | ## Additional context 37 | 38 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE/simple_pull_request.md: -------------------------------------------------------------------------------- 1 | ### Checklist 2 | 3 | - [ ] I have added new tests to cover the changes made by this PR (Only if applicable). 4 | - [ ] I have run the tests (`npm test`) and made sure my addition passed them. 5 | 6 | ### Description 7 | 8 |