Fallback command maps in view context

master
Allen Webster 2019-10-19 18:46:57 -07:00
parent 2d8653754d
commit 2911974fa0
17 changed files with 459 additions and 456 deletions

View File

@ -1585,6 +1585,18 @@ view_pop_context(Application_Links *app, View_ID view_id){
return(result);
}
api(custom) function b32
view_alter_context(Application_Links *app, View_ID view_id, View_Context *ctx){
Models *models = (Models*)app->cmd_context;
View *view = imp_get_view(models, view_id);
b32 result = false;
if (api_check_view(view)){
view_alter_context(view, ctx);
result = true;
}
return(result);
}
api(custom) function View_Context
view_current_context(Application_Links *app, View_ID view_id){
Models *models = (Models*)app->cmd_context;

View File

@ -13,16 +13,15 @@
#include "4coder_base_types.h"
#include "4coder_version.h"
#include "4coder_table.h"
#include "4coder_events.h"
#include "4coder_default_colors.h"
#include "4coder_types.h"
#define STATIC_LINK_API
#include "generated/custom_api.h"
#include "4coder_table.h"
#include "4coder_string_match.h"
#include "4coder_token.h"
#include "4coder_command_map.h"
#include "4coder_system_types.h"
#define DYNAMIC_LINK_API

View File

@ -430,6 +430,13 @@ view_push_context(View *view, View_Context *ctx){
node->delta_rule_memory = push_array_zero(view->node_arena, u8, ctx->delta_rule_memory_size);
}
function void
view_alter_context(View *view, View_Context *ctx){
View_Context_Node *node = view->ctx;
Assert(node != 0);
block_copy_struct(&node->ctx, ctx);
}
function void
view_pop_context(View *view){
View_Context_Node *node = view->ctx;

View File

@ -1,62 +0,0 @@
/*
* Mr. 4th Dimention - Allen Webster
*
* 24.03.2015
*
* Command representation structures
*
*/
// TOP
#if !defined(FRED_COMMAND_H)
#define FRED_COMMAND_H
struct Command_Binding{
Custom_Command_Function *custom;
};
struct Command_Modified_Binding{
Command_Modified_Binding *next;
SNode order_node;
Input_Modifier_Set modifiers;
Command_Binding binding;
};
struct Command_Binding_List{
Command_Binding_List *next;
SNode *first;
SNode *last;
i32 count;
};
struct Command_Map{
Command_Map *next;
Command_Map_ID id;
Command_Map_ID parent;
Command_Binding text_input_command;
Arena node_arena;
Table_u64_u64 event_code_to_binding_list;
Command_Modified_Binding *binding_first;
Command_Modified_Binding *binding_last;
Command_Binding_List *list_first;
Command_Binding_List *list_last;
struct Binding_Unit *real_beginning;
};
struct Mapping{
Arena *node_arena;
Heap heap;
Base_Allocator heap_wrapper;
Table_u64_u64 id_to_map;
Command_Map_ID id_counter;
Command_Map *free_maps;
Command_Modified_Binding *free_bindings;
Command_Binding_List *free_lists;
};
#endif
// BOTTOM

View File

@ -200,6 +200,20 @@ ui_fallback_command_dispatch(Application_Links *app, View_ID view,
return(result);
}
function b32
ui_fallback_command_dispatch(Application_Links *app, View_ID view, User_Input *in){
b32 result = false;
View_Context ctx = view_current_context(app, view);
if (ctx.mapping != 0){
Command_Map *map = mapping_get_map(ctx.mapping, ctx.map_id);
result = ui_fallback_command_dispatch(app, view, ctx.mapping, map, in);
}
else{
leave_current_input_unhandled(app);
}
return(result);
}
////////////////////////////////
static void

View File

@ -56,6 +56,14 @@ CUSTOM_DOC("Default command for responding to a try-exit event")
CUSTOM_COMMAND_SIG(default_view_input_handler)
CUSTOM_DOC("Input consumption loop for default view behavior")
{
{
View_ID view = get_active_view(app, Access_Always);
View_Context ctx = view_current_context(app, view);
ctx.mapping = &framework_mapping;
ctx.map_id = mapid_global;
view_alter_context(app, view, &ctx);
}
for (;;){
// NOTE(allen): Get the binding from the buffer's current map
User_Input input = get_next_input(app, EventPropertyGroup_Any, 0);

View File

@ -9,6 +9,7 @@
#include "4coder_base_types.h"
#include "4coder_version.h"
#include "4coder_table.h"
#include "4coder_default_colors.h"
#include "4coder_events.h"
#include "4coder_types.h"
@ -25,10 +26,8 @@
#include "4coder_system_allocator.cpp"
#include "4coder_profile.h"
#include "4coder_table.h"
#include "4coder_token.h"
#include "generated/lexer_cpp.h"
#include "4coder_command_map.h"
#include "4coder_string_match.h"
#include "4coder_helper.h"
#include "4coder_delta_rule.h"

View File

@ -45,6 +45,18 @@ view_get_lister(View_ID view){
return(global_lister_state[view - 1]);
}
function void
lister_set_map(Lister *lister, Mapping *mapping, Command_Map *map){
lister->mapping = mapping;
lister->map = map;
}
function void
lister_set_map(Lister *lister, Mapping *mapping, Command_Map_ID map){
lister->mapping = mapping;
lister->map = mapping_get_map(mapping, map);
}
function Lister*
begin_lister(Application_Links *app, Arena *arena, View_ID view,
void *user_data, umem user_data_size){
@ -60,21 +72,11 @@ begin_lister(Application_Links *app, Arena *arena, View_ID view,
}
global_lister_state[view - 1] = lister;
lister->restore_all_point = begin_temp(lister->arena);
View_Context ctx = view_current_context(app, view);
lister_set_map(lister, ctx.mapping, ctx.map_id);
return(lister);
}
function void
lister_set_map(Lister *lister, Mapping *mapping, Command_Map *map){
lister->mapping = mapping;
lister->map = map;
}
function void
lister_set_map(Lister *lister, Mapping *mapping, Command_Map_ID map){
lister->mapping = mapping;
lister->map = mapping_get_map(mapping, map);
}
function void
lister_set_string(String_Const_u8 string, String_u8 *target){
target->size = 0;

View File

@ -120,7 +120,6 @@ run_lister_with_refresh_handler(Application_Links *app, char *query_string,
if (handlers.refresh != 0){
Scratch_Block scratch(app);
Lister *lister = begin_lister(app, scratch, view, user_data, user_data_size);
lister_set_map(lister, &framework_mapping, mapid_global);
lister_set_query(lister, query_string);
lister->handlers = handlers;
handlers.refresh(app, lister);
@ -137,13 +136,6 @@ run_lister_with_refresh_handler(Application_Links *app, char *query_string,
}
}
function i32
lister__get_arena_size_(i32 option_count, i32 user_data_size,
i32 estimated_string_space_size){
i32 arena_size = (user_data_size + 7 + option_count*sizeof(Lister_Node) + estimated_string_space_size);
return(arena_size);
}
function void
run_lister_with_options_array(Application_Links *app, char *query_string,
Lister_Activation_Type *activate,
@ -153,7 +145,6 @@ run_lister_with_options_array(Application_Links *app, char *query_string,
View_ID view){
Scratch_Block scratch(app);
Lister *lister = begin_lister(app, scratch, view, user_data, user_data_size);
lister_set_map(lister, &framework_mapping, mapid_global);
for (i32 i = 0; i < option_count; i += 1){
lister_add_item(lister, options[i].string, options[i].status, options[i].user_data, 0);
}
@ -171,7 +162,6 @@ run_lister_with_fixed_options(Application_Links *app, char *query_string,
View_ID view){
Scratch_Block scratch(app);
Lister *lister = begin_lister(app, scratch, view, user_data, user_data_size);
lister_set_map(lister, &framework_mapping, mapid_global);
for (i32 i = 0; i < option_count; i += 1){
Key_Code code = options[i].key_code;
void *extra = lister_add_item(lister, SCu8(options[i].string), SCu8(options[i].status),

View File

@ -987,7 +987,7 @@ log_graph__click_jump_to_event_source(Application_Links *app, Vec2_f32 m_p){
}
}
CUSTOM_COMMAND_SIG(show_the_log_graph)
CUSTOM_UI_COMMAND_SIG(show_the_log_graph)
CUSTOM_DOC("Parses *log* and displays the 'log graph' UI")
{
Buffer_ID log_buffer = get_buffer_by_name(app, string_u8_litexpr("*log*"), Access_Always);
@ -1065,10 +1065,7 @@ CUSTOM_DOC("Parses *log* and displays the 'log graph' UI")
}
if (!handled){
// TODO(allen): get mapping and map from a more flexible source.
Mapping *mapping = &framework_mapping;
Command_Map *map = mapping_get_map(mapping, mapid_global);
if (ui_fallback_command_dispatch(app, view, mapping, map, &in)){
if (ui_fallback_command_dispatch(app, view, &in)){
break;
}
}

View File

@ -426,10 +426,7 @@ CUSTOM_DOC("Inspect all currently collected profiling information in 4coder's se
}
if (!handled){
// TODO(allen): get mapping and map from a more flexible source.
Mapping *mapping = &framework_mapping;
Command_Map *map = mapping_get_map(mapping, mapid_global);
if (ui_fallback_command_dispatch(app, view, mapping, map, &in)){
if (ui_fallback_command_dispatch(app, view, &in)){
break;
}
}

View File

@ -531,15 +531,61 @@ void name(Application_Links *app, String_Const_u8 contents)
typedef void Render_Caller_Function(Application_Links *app, Frame_Info frame_info, View_ID view);
#define RENDER_CALLER_SIG(name) void name(Application_Links *app, Frame_Info frame_info, View_ID view)
typedef i64 Command_Map_ID;
struct Command_Binding{
Custom_Command_Function *custom;
};
struct Command_Modified_Binding{
Command_Modified_Binding *next;
SNode order_node;
Input_Modifier_Set modifiers;
Command_Binding binding;
};
struct Command_Binding_List{
Command_Binding_List *next;
SNode *first;
SNode *last;
i32 count;
};
struct Command_Map{
Command_Map *next;
Command_Map_ID id;
Command_Map_ID parent;
Command_Binding text_input_command;
Arena node_arena;
Table_u64_u64 event_code_to_binding_list;
Command_Modified_Binding *binding_first;
Command_Modified_Binding *binding_last;
Command_Binding_List *list_first;
Command_Binding_List *list_last;
struct Binding_Unit *real_beginning;
};
struct Mapping{
Arena *node_arena;
Heap heap;
Base_Allocator heap_wrapper;
Table_u64_u64 id_to_map;
Command_Map_ID id_counter;
Command_Map *free_maps;
Command_Modified_Binding *free_bindings;
Command_Binding_List *free_lists;
};
struct View_Context{
Render_Caller_Function *render_caller;
Delta_Rule_Function *delta_rule;
umem delta_rule_memory_size;
b32 hides_buffer;
Mapping *mapping;
Command_Map_ID map_id;
};
typedef i64 Command_Map_ID;
STRUCT Color_Picker{
String_Const_u8 title;
argb_color *dest;

View File

@ -243,19 +243,19 @@ static Command_Metadata fcoder_metacmd_table[211] = {
{ PROC_LINKS(seek_end_of_line, 0), false, "seek_end_of_line", 16, "Seeks the cursor to the end of the visual line.", 47, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2124 },
{ PROC_LINKS(goto_beginning_of_file, 0), false, "goto_beginning_of_file", 22, "Sets the cursor to the beginning of the file.", 45, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2130 },
{ PROC_LINKS(goto_end_of_file, 0), false, "goto_end_of_file", 16, "Sets the cursor to the end of the file.", 39, "w:\\4ed\\code\\custom\\4coder_helper.cpp", 36, 2138 },
{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 256 },
{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 266 },
{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 276 },
{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 286 },
{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 351 },
{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 357 },
{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 363 },
{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 369 },
{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 375 },
{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 381 },
{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 387 },
{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 393 },
{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 399 },
{ PROC_LINKS(change_active_panel, 0), false, "change_active_panel", 19, "Change the currently active panel, moving to the panel with the next highest view_id.", 85, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 270 },
{ PROC_LINKS(change_active_panel_backwards, 0), false, "change_active_panel_backwards", 29, "Change the currently active panel, moving to the panel with the next lowest view_id.", 84, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 280 },
{ PROC_LINKS(open_panel_vsplit, 0), false, "open_panel_vsplit", 17, "Create a new panel by vertically splitting the active panel.", 60, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 290 },
{ PROC_LINKS(open_panel_hsplit, 0), false, "open_panel_hsplit", 17, "Create a new panel by horizontally splitting the active panel.", 62, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 300 },
{ PROC_LINKS(suppress_mouse, 0), false, "suppress_mouse", 14, "Hides the mouse and causes all mosue input (clicks, position, wheel) to be ignored.", 83, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 365 },
{ PROC_LINKS(allow_mouse, 0), false, "allow_mouse", 11, "Shows the mouse and causes all mouse input to be processed normally.", 68, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 371 },
{ PROC_LINKS(toggle_mouse, 0), false, "toggle_mouse", 12, "Toggles the mouse suppression mode, see suppress_mouse and allow_mouse.", 71, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 377 },
{ PROC_LINKS(set_mode_to_original, 0), false, "set_mode_to_original", 20, "Sets the edit mode to 4coder original.", 38, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 383 },
{ PROC_LINKS(set_mode_to_notepad_like, 0), false, "set_mode_to_notepad_like", 24, "Sets the edit mode to Notepad like.", 35, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 389 },
{ PROC_LINKS(toggle_highlight_line_at_cursor, 0), false, "toggle_highlight_line_at_cursor", 31, "Toggles the line highlight at the cursor.", 41, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 395 },
{ PROC_LINKS(toggle_highlight_enclosing_scopes, 0), false, "toggle_highlight_enclosing_scopes", 33, "In code files scopes surrounding the cursor are highlighted with distinguishing colors.", 87, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 401 },
{ PROC_LINKS(toggle_paren_matching_helper, 0), false, "toggle_paren_matching_helper", 28, "In code files matching parentheses pairs are colored with distinguishing colors.", 80, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 407 },
{ PROC_LINKS(toggle_fullscreen, 0), false, "toggle_fullscreen", 17, "Toggle fullscreen mode on or off. The change(s) do not take effect until the next frame.", 89, "w:\\4ed\\code\\custom\\4coder_default_framework.cpp", 47, 413 },
{ PROC_LINKS(write_text_input, 0), false, "write_text_input", 16, "Inserts whatever character was used to trigger this command.", 60, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 58 },
{ PROC_LINKS(write_space, 0), false, "write_space", 11, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 66 },
{ PROC_LINKS(write_underscore, 0), false, "write_underscore", 16, "Inserts an underscore.", 22, "w:\\4ed\\code\\custom\\4coder_base_commands.cpp", 43, 72 },
@ -356,12 +356,12 @@ static Command_Metadata fcoder_metacmd_table[211] = {
{ PROC_LINKS(set_eol_mode_to_lf, 0), false, "set_eol_mode_to_lf", 18, "Puts the buffer in lf line ending mode.", 39, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 91 },
{ PROC_LINKS(set_eol_mode_to_binary, 0), false, "set_eol_mode_to_binary", 22, "Puts the buffer in bin line ending mode.", 40, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 102 },
{ PROC_LINKS(set_eol_mode_from_contents, 0), false, "set_eol_mode_from_contents", 26, "Sets the buffer's line ending mode to match the contents of the buffer.", 71, "w:\\4ed\\code\\custom\\4coder_eol.cpp", 33, 113 },
{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 487 },
{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 506 },
{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 577 },
{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 616 },
{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 649 },
{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 712 },
{ PROC_LINKS(interactive_switch_buffer, 0), true, "interactive_switch_buffer", 25, "Interactively switch to an open buffer.", 39, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 477 },
{ PROC_LINKS(interactive_kill_buffer, 0), true, "interactive_kill_buffer", 23, "Interactively kill an open buffer.", 34, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 496 },
{ PROC_LINKS(interactive_open_or_new, 0), true, "interactive_open_or_new", 23, "Interactively open a file out of the file system.", 49, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 567 },
{ PROC_LINKS(interactive_new, 0), true, "interactive_new", 15, "Interactively creates a new file.", 33, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 606 },
{ PROC_LINKS(interactive_open, 0), true, "interactive_open", 16, "Interactively opens a file.", 27, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 639 },
{ PROC_LINKS(command_lister, 0), true, "command_lister", 14, "Opens an interactive list of all registered commands.", 53, "w:\\4ed\\code\\custom\\4coder_lists.cpp", 35, 702 },
{ PROC_LINKS(auto_indent_whole_file, 0), false, "auto_indent_whole_file", 22, "Audo-indents the entire current buffer.", 39, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 356 },
{ PROC_LINKS(auto_indent_line_at_cursor, 0), false, "auto_indent_line_at_cursor", 26, "Auto-indents the line on which the cursor sits.", 47, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 365 },
{ PROC_LINKS(auto_indent_range, 0), false, "auto_indent_range", 17, "Auto-indents the range between the cursor and the mark.", 55, "w:\\4ed\\code\\custom\\4coder_auto_indent.cpp", 41, 375 },
@ -388,7 +388,7 @@ static Command_Metadata fcoder_metacmd_table[211] = {
{ PROC_LINKS(if_read_only_goto_position, 0), false, "if_read_only_goto_position", 26, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor.", 106, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 562 },
{ PROC_LINKS(if_read_only_goto_position_same_panel, 0), false, "if_read_only_goto_position_same_panel", 37, "If the buffer in the active view is writable, inserts a character, otherwise performs goto_jump_at_cursor_same_panel.", 117, "w:\\4ed\\code\\custom\\4coder_jump_sticky.cpp", 41, 579 },
{ PROC_LINKS(view_jump_list_with_lister, 0), false, "view_jump_list_with_lister", 26, "When executed on a buffer with jumps, creates a persistent lister for all the jumps", 83, "w:\\4ed\\code\\custom\\4coder_jump_lister.cpp", 41, 104 },
{ PROC_LINKS(show_the_log_graph, 0), false, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "w:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 990 },
{ PROC_LINKS(show_the_log_graph, 0), true, "show_the_log_graph", 18, "Parses *log* and displays the 'log graph' UI", 44, "w:\\4ed\\code\\custom\\4coder_log_parser.cpp", 40, 990 },
{ PROC_LINKS(copy, 0), false, "copy", 4, "Copy the text in the range from the cursor to the mark onto the clipboard.", 74, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 19 },
{ PROC_LINKS(cut, 0), false, "cut", 3, "Cut the text in the range from the cursor to the mark onto the clipboard.", 73, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 28 },
{ PROC_LINKS(paste, 0), false, "paste", 5, "At the cursor, insert the text at the top of the clipboard.", 59, "w:\\4ed\\code\\custom\\4coder_clipboard.cpp", 39, 39 },

View File

@ -90,6 +90,7 @@ vtable->view_set_buffer = view_set_buffer;
vtable->view_post_fade = view_post_fade;
vtable->view_push_context = view_push_context;
vtable->view_pop_context = view_pop_context;
vtable->view_alter_context = view_alter_context;
vtable->view_current_context = view_current_context;
vtable->view_current_context_hook_memory = view_current_context_hook_memory;
vtable->create_user_managed_scope = create_user_managed_scope;
@ -263,6 +264,7 @@ view_set_buffer = vtable->view_set_buffer;
view_post_fade = vtable->view_post_fade;
view_push_context = vtable->view_push_context;
view_pop_context = vtable->view_pop_context;
view_alter_context = vtable->view_alter_context;
view_current_context = vtable->view_current_context;
view_current_context_hook_memory = vtable->view_current_context_hook_memory;
create_user_managed_scope = vtable->create_user_managed_scope;

View File

@ -88,6 +88,7 @@
#define custom_view_post_fade_sig() b32 custom_view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, int_color color)
#define custom_view_push_context_sig() b32 custom_view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx)
#define custom_view_pop_context_sig() b32 custom_view_pop_context(Application_Links* app, View_ID view_id)
#define custom_view_alter_context_sig() b32 custom_view_alter_context(Application_Links* app, View_ID view, View_Context* ctx)
#define custom_view_current_context_sig() View_Context custom_view_current_context(Application_Links* app, View_ID view_id)
#define custom_view_current_context_hook_memory_sig() Data custom_view_current_context_hook_memory(Application_Links* app, View_ID view_id, Hook_ID hook_id)
#define custom_create_user_managed_scope_sig() Managed_Scope custom_create_user_managed_scope(Application_Links* app)
@ -257,6 +258,7 @@ typedef b32 custom_view_set_buffer_type(Application_Links* app, View_ID view_id,
typedef b32 custom_view_post_fade_type(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, int_color color);
typedef b32 custom_view_push_context_type(Application_Links* app, View_ID view_id, View_Context* ctx);
typedef b32 custom_view_pop_context_type(Application_Links* app, View_ID view_id);
typedef b32 custom_view_alter_context_type(Application_Links* app, View_ID view, View_Context* ctx);
typedef View_Context custom_view_current_context_type(Application_Links* app, View_ID view_id);
typedef Data custom_view_current_context_hook_memory_type(Application_Links* app, View_ID view_id, Hook_ID hook_id);
typedef Managed_Scope custom_create_user_managed_scope_type(Application_Links* app);
@ -427,6 +429,7 @@ custom_view_set_buffer_type *view_set_buffer;
custom_view_post_fade_type *view_post_fade;
custom_view_push_context_type *view_push_context;
custom_view_pop_context_type *view_pop_context;
custom_view_alter_context_type *view_alter_context;
custom_view_current_context_type *view_current_context;
custom_view_current_context_hook_memory_type *view_current_context_hook_memory;
custom_create_user_managed_scope_type *create_user_managed_scope;
@ -598,6 +601,7 @@ internal b32 view_set_buffer(Application_Links* app, View_ID view_id, Buffer_ID
internal b32 view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, int_color color);
internal b32 view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx);
internal b32 view_pop_context(Application_Links* app, View_ID view_id);
internal b32 view_alter_context(Application_Links* app, View_ID view, View_Context* ctx);
internal View_Context view_current_context(Application_Links* app, View_ID view_id);
internal Data view_current_context_hook_memory(Application_Links* app, View_ID view_id, Hook_ID hook_id);
internal Managed_Scope create_user_managed_scope(Application_Links* app);
@ -769,6 +773,7 @@ global custom_view_set_buffer_type *view_set_buffer = 0;
global custom_view_post_fade_type *view_post_fade = 0;
global custom_view_push_context_type *view_push_context = 0;
global custom_view_pop_context_type *view_pop_context = 0;
global custom_view_alter_context_type *view_alter_context = 0;
global custom_view_current_context_type *view_current_context = 0;
global custom_view_current_context_hook_memory_type *view_current_context_hook_memory = 0;
global custom_create_user_managed_scope_type *create_user_managed_scope = 0;

View File

@ -88,6 +88,7 @@ api(custom) function b32 view_set_buffer(Application_Links* app, View_ID view_id
api(custom) function b32 view_post_fade(Application_Links* app, View_ID view_id, f32 seconds, Range_i64 range, int_color color);
api(custom) function b32 view_push_context(Application_Links* app, View_ID view_id, View_Context* ctx);
api(custom) function b32 view_pop_context(Application_Links* app, View_ID view_id);
api(custom) function b32 view_alter_context(Application_Links* app, View_ID view, View_Context* ctx);
api(custom) function View_Context view_current_context(Application_Links* app, View_ID view_id);
api(custom) function Data view_current_context_hook_memory(Application_Links* app, View_ID view_id, Hook_ID hook_id);
api(custom) function Managed_Scope create_user_managed_scope(Application_Links* app);

View File

@ -43,435 +43,421 @@ lexeme_table_lookup(u64 *hash_array, String_Const_u8 *key_array,
}
#endif
u64 main_keys_hash_array[121] = {
0xf9b82a9bc92c5f33,0xb6436fbc362998db,0x0000000000000000,0xfba6da6846b00cd1,
0xe34f6ca007b5b81d,0x8a1aa0c1cbf05e73,0x8fd4a100ba640fcd,0x0000000000000000,
0x2ce3ee58579b1a55,0x22656326fd2b4911,0x0000000000000000,0xf9b8223032c3ecd1,
0x8fd4a100a91f262d,0xa88ecc26a7f77b99,0xb6436cf8c4fa5e81,0x0000000000000000,
0x0000000000000000,0x8fd4a100a9643df1,0x0000000000000000,0x8fd4a100a9603db3,
0x0000000000000000,0xf9b83340fd2e9de3,0x0000000000000000,0xfba6da5cdcae2bd3,
0xb6436fbc3629996b,0xf9b89388bba220d3,0xfba6da684500801f,0xf9a78870e743a847,
0x0000000000000000,0xa88ecc26a7e0d42d,0xa88ecc26a7f23dcd,0xf9b812edb5d97433,
0xa88ecc26a7ef7051,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0x0000000000000000,0x0000000000000000,0xf9b9a571da137975,0xfba6da64e06f0463,
0xfba6da686cfb1c71,0xfba6da681a116c23,0x0000000000000000,0x0000000000000000,
0x11acd6d4ea0a02a1,0x0000000000000000,0x0000000000000000,0x6affad88658048a1,
0x0000000000000000,0x0000000000000000,0x0000000000000000,0x8a1aa0c1cbf1b917,
0x0000000000000000,0x0000000000000000,0xa88ecc26a7a547b1,0x8fd4a100bcf58153,
0x8fd4a100aaefa25f,0x0000000000000000,0xa88ecc26a7e3323d,0x0000000000000000,
0x0000000000000000,0x8fd4a100baee8df7,0xfba6da64d8ddd323,0x0000000000000000,
0x0000000000000000,0xa88ecc26a79f7b99,0xfba6da5cd0b49155,0xa88ecc26a7f69e9d,
0xfba6da67185db213,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0x0000000000000000,0xfba6da69c6296b5b,0x8fd4a100b7ff4c8d,0x0000000000000000,
0xf9b83de0de17f603,0x0000000000000000,0x6ca6c603c047daa1,0x0000000000000000,
0x0000000000000000,0x3308377a8b225aa1,0x0000000000000000,0x8a1aa0c1cbf163a9,
0x0000000000000000,0x0000000000000000,0xb6436c68778fc797,0xfba6da675a1126e5,
0xa88ecc26a7ee0e0b,0x8fd4a100ae608e9d,0x0000000000000000,0x2ce3ee58579b1d7f,
0x0000000000000000,0x8fd4a103511baa33,0xfba6da6882ea3055,0x0000000000000000,
0xb6436c2911b7425d,0x0000000000000000,0x6ebc09e02b8457d3,0xf9b830388e251d3d,
0xa88ecc26a7a5110b,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0x0000000000000000,0xb6436cf7d2df0e63,0xb6436f1fe4e8fbb3,0x22664a1c2bc81d01,
0x0000000000000000,0x0000000000000000,0x0000000000000000,0xfba6da686e9a3cc1,
0x8a1aa0c1cbf00147,0x0000000000000000,0xf9b894d86adff051,0x8a1aa0c1cbf09e37,
0xfba6da686e7280bb,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0x0000000000000000,
u64 main_keys_hash_array[115] = {
0xbf6bcf77f466dd27,0x0000000000000000,0x0000000000000000,0xddafeacf66f79855,
0x0000000000000000,0xdc1a48df5108b771,0x42538c18e51eaa09,0x0000000000000000,
0x0000000000000000,0x0000000000000000,0x22537917f8a8a3eb,0xddafeacf66260e41,
0xbf6bcf7919c5cd77,0x0000000000000000,0x0000000000000000,0x7d6693cbac2bdd35,
0x0000000000000000,0x5b9fb6e2e69394f5,0xbf6bcf7968ce0a97,0x0000000000000000,
0xf3e523d06624f633,0xf3e523d067e7e921,0x0000000000000000,0xe174e4ef910e16f5,
0x0000000000000000,0xbf6bcf7679ec9457,0x8bf3b33d8d78a995,0x0000000000000000,
0x0000000000000000,0x42538c18e51ea93b,0xbf6bcf89bfdadcaf,0x0000000000000000,
0x0000000000000000,0x6513238162438c87,0x0000000000000000,0x0000000000000000,
0xdc1a48e959a6b7cb,0x0000000000000000,0x0000000000000000,0x8bf3bea4cea76929,
0x8bf3b047b147be3f,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0x22537917f8a89707,0xf3e523d1bafd48b7,0xdc19ecdc1f3f3911,0xddafeacf666fc121,
0xf3e523d198883577,0x0000000000000000,0x0000000000000000,0x0000000000000000,
0xddafeacf6608a25d,0xf3e523d1b32acf23,0x0000000000000000,0x0000000000000000,
0x0ca578ca97852d1d,0x0000000000000000,0x0000000000000000,0xddafeacf66f75937,
0x22537917f8a817f5,0x0000000000000000,0x8bf3b4d379e3209b,0x0000000000000000,
0xdc1f2554d985408f,0x22537917f8a92833,0x0000000000000000,0x0000000000000000,
0xdc19eafe1d4c1d47,0xbf6bcf79d5fc73bd,0x0000000000000000,0xdc19e7390520f3bd,
0x0000000000000000,0xdc205ac0aff5457d,0xddafeacf66236661,0x0000000000000000,
0xddafeacf66cdd9b5,0xbf6bcf766259902f,0x0000000000000000,0xbf6bcf79660fe8ef,
0xbf6bcf79f6fb461b,0xdc19f20d6e2f3f0f,0xddafeacf66d373a1,0xdc1a45e31224453f,
0x0000000000000000,0xf3e523d067cb75c1,0x8bf3b4ed96a9dee7,0x0cd7d5c6c06bf5bd,
0x0000000000000000,0xbf6bcf7919d76689,0xe7c91e3f330f2359,0xc31899a1114df135,
0xbf6bcf7679be41ad,0xbf6bcf7691c57781,0x0000000000000000,0x0000000000000000,
0xf3e523d06c30d251,0x0000000000000000,0x22537917f8a8218b,0x8bf3b4a94dbb5eef,
0xf3e523d06c41aad5,0x0000000000000000,0x0000000000000000,0x8bf3b047b147bfd7,
0x0000000000000000,0xbf6bcf79d4a6eb89,0xf3e523d1b5c80ee1,0xddafeacf662637f5,
0x0000000000000000,0xdc1a4095f2b2cc07,0xddafeacf660b2247,0x0000000000000000,
0xbf6bcf765be19f55,0x0000000000000000,0xf3e523d181b6f48f,
};
u8 main_keys_key_array_0[] = {0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,};
u8 main_keys_key_array_1[] = {0x61,0x6c,0x69,0x67,0x6e,0x6f,0x66,};
u8 main_keys_key_array_3[] = {0x73,0x69,0x67,0x6e,0x65,0x64,};
u8 main_keys_key_array_4[] = {0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x6c,0x6f,0x63,0x61,0x6c,};
u8 main_keys_key_array_5[] = {0x69,0x6e,0x74,};
u8 main_keys_key_array_6[] = {0x75,0x73,0x69,0x6e,0x67,};
u8 main_keys_key_array_8[] = {0x64,0x6f,};
u8 main_keys_key_array_9[] = {0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,};
u8 main_keys_key_array_11[] = {0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,};
u8 main_keys_key_array_12[] = {0x63,0x6f,0x6e,0x73,0x74,};
u8 main_keys_key_array_13[] = {0x65,0x6e,0x75,0x6d,};
u8 main_keys_key_array_14[] = {0x6e,0x75,0x6c,0x6c,0x70,0x74,0x72,};
u8 main_keys_key_array_17[] = {0x63,0x61,0x74,0x63,0x68,};
u8 main_keys_key_array_19[] = {0x63,0x6c,0x61,0x73,0x73,};
u8 main_keys_key_array_21[] = {0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,};
u8 main_keys_key_array_23[] = {0x65,0x78,0x70,0x6f,0x72,0x74,};
u8 main_keys_key_array_24[] = {0x61,0x6c,0x69,0x67,0x6e,0x61,0x73,};
u8 main_keys_key_array_25[] = {0x64,0x65,0x63,0x6c,0x74,0x79,0x70,0x65,};
u8 main_keys_key_array_26[] = {0x73,0x69,0x7a,0x65,0x6f,0x66,};
u8 main_keys_key_array_27[] = {0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,};
u8 main_keys_key_array_29[] = {0x67,0x6f,0x74,0x6f,};
u8 main_keys_key_array_30[] = {0x6c,0x6f,0x6e,0x67,};
u8 main_keys_key_array_31[] = {0x6e,0x6f,0x65,0x78,0x63,0x65,0x70,0x74,};
u8 main_keys_key_array_32[] = {0x74,0x72,0x75,0x65,};
u8 main_keys_key_array_38[] = {0x65,0x78,0x70,0x6c,0x69,0x63,0x69,0x74,};
u8 main_keys_key_array_39[] = {0x64,0x6f,0x75,0x62,0x6c,0x65,};
u8 main_keys_key_array_40[] = {0x73,0x77,0x69,0x74,0x63,0x68,};
u8 main_keys_key_array_41[] = {0x69,0x6e,0x6c,0x69,0x6e,0x65,};
u8 main_keys_key_array_44[] = {0x63,0x6f,0x6e,0x73,0x74,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_47[] = {0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_51[] = {0x66,0x6f,0x72,};
u8 main_keys_key_array_54[] = {0x63,0x61,0x73,0x65,};
u8 main_keys_key_array_55[] = {0x73,0x68,0x6f,0x72,0x74,};
u8 main_keys_key_array_56[] = {0x62,0x72,0x65,0x61,0x6b,};
u8 main_keys_key_array_58[] = {0x76,0x6f,0x69,0x64,};
u8 main_keys_key_array_61[] = {0x75,0x6e,0x69,0x6f,0x6e,};
u8 main_keys_key_array_62[] = {0x64,0x65,0x6c,0x65,0x74,0x65,};
u8 main_keys_key_array_65[] = {0x62,0x6f,0x6f,0x6c,};
u8 main_keys_key_array_66[] = {0x65,0x78,0x74,0x65,0x72,0x6e,};
u8 main_keys_key_array_67[] = {0x65,0x6c,0x73,0x65,};
u8 main_keys_key_array_68[] = {0x66,0x72,0x69,0x65,0x6e,0x64,};
u8 main_keys_key_array_73[] = {0x70,0x75,0x62,0x6c,0x69,0x63,};
u8 main_keys_key_array_74[] = {0x66,0x6c,0x6f,0x61,0x74,};
u8 main_keys_key_array_76[] = {0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,};
u8 main_keys_key_array_78[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_81[] = {0x72,0x65,0x69,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_83[] = {0x61,0x73,0x6d,};
u8 main_keys_key_array_86[] = {0x74,0x79,0x70,0x65,0x64,0x65,0x66,};
u8 main_keys_key_array_87[] = {0x74,0x79,0x70,0x65,0x69,0x64,};
u8 main_keys_key_array_88[] = {0x74,0x68,0x69,0x73,};
u8 main_keys_key_array_89[] = {0x66,0x61,0x6c,0x73,0x65,};
u8 main_keys_key_array_91[] = {0x69,0x66,};
u8 main_keys_key_array_93[] = {0x77,0x68,0x69,0x6c,0x65,};
u8 main_keys_key_array_94[] = {0x72,0x65,0x74,0x75,0x72,0x6e,};
u8 main_keys_key_array_96[] = {0x76,0x69,0x72,0x74,0x75,0x61,0x6c,};
u8 main_keys_key_array_98[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x61,0x73,0x73,0x65,0x72,0x74,};
u8 main_keys_key_array_99[] = {0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,};
u8 main_keys_key_array_100[] = {0x63,0x68,0x61,0x72,};
u8 main_keys_key_array_105[] = {0x70,0x72,0x69,0x76,0x61,0x74,0x65,};
u8 main_keys_key_array_106[] = {0x64,0x65,0x66,0x61,0x75,0x6c,0x74,};
u8 main_keys_key_array_107[] = {0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,};
u8 main_keys_key_array_111[] = {0x73,0x74,0x72,0x75,0x63,0x74,};
u8 main_keys_key_array_112[] = {0x6e,0x65,0x77,};
u8 main_keys_key_array_114[] = {0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,};
u8 main_keys_key_array_115[] = {0x74,0x72,0x79,};
u8 main_keys_key_array_116[] = {0x73,0x74,0x61,0x74,0x69,0x63,};
String_Const_u8 main_keys_key_array[121] = {
{main_keys_key_array_0, 8},
{main_keys_key_array_1, 7},
{0, 0},
{main_keys_key_array_3, 6},
{main_keys_key_array_4, 12},
{main_keys_key_array_5, 3},
{main_keys_key_array_6, 5},
{0, 0},
{main_keys_key_array_8, 2},
{main_keys_key_array_9, 9},
{0, 0},
{main_keys_key_array_11, 8},
{main_keys_key_array_12, 5},
{main_keys_key_array_13, 4},
{main_keys_key_array_14, 7},
u8 main_keys_key_array_0[] = {0x70,0x75,0x62,0x6c,0x69,0x63,};
u8 main_keys_key_array_3[] = {0x63,0x61,0x73,0x65,};
u8 main_keys_key_array_5[] = {0x65,0x78,0x70,0x6c,0x69,0x63,0x69,0x74,};
u8 main_keys_key_array_6[] = {0x64,0x6f,};
u8 main_keys_key_array_10[] = {0x6e,0x65,0x77,};
u8 main_keys_key_array_11[] = {0x65,0x6c,0x73,0x65,};
u8 main_keys_key_array_12[] = {0x65,0x78,0x70,0x6f,0x72,0x74,};
u8 main_keys_key_array_15[] = {0x64,0x79,0x6e,0x61,0x6d,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_17[] = {0x63,0x6f,0x6e,0x73,0x74,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_18[] = {0x69,0x6e,0x6c,0x69,0x6e,0x65,};
u8 main_keys_key_array_20[] = {0x62,0x72,0x65,0x61,0x6b,};
u8 main_keys_key_array_21[] = {0x66,0x61,0x6c,0x73,0x65,};
u8 main_keys_key_array_23[] = {0x72,0x65,0x69,0x6e,0x74,0x65,0x72,0x70,0x72,0x65,0x74,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_25[] = {0x73,0x74,0x61,0x74,0x69,0x63,};
u8 main_keys_key_array_26[] = {0x6e,0x75,0x6c,0x6c,0x70,0x74,0x72,};
u8 main_keys_key_array_29[] = {0x69,0x66,};
u8 main_keys_key_array_30[] = {0x66,0x72,0x69,0x65,0x6e,0x64,};
u8 main_keys_key_array_33[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x61,0x73,0x73,0x65,0x72,0x74,};
u8 main_keys_key_array_36[] = {0x6f,0x70,0x65,0x72,0x61,0x74,0x6f,0x72,};
u8 main_keys_key_array_39[] = {0x76,0x69,0x72,0x74,0x75,0x61,0x6c,};
u8 main_keys_key_array_40[] = {0x61,0x6c,0x69,0x67,0x6e,0x6f,0x66,};
u8 main_keys_key_array_44[] = {0x69,0x6e,0x74,};
u8 main_keys_key_array_45[] = {0x73,0x68,0x6f,0x72,0x74,};
u8 main_keys_key_array_46[] = {0x74,0x79,0x70,0x65,0x6e,0x61,0x6d,0x65,};
u8 main_keys_key_array_47[] = {0x76,0x6f,0x69,0x64,};
u8 main_keys_key_array_48[] = {0x63,0x6c,0x61,0x73,0x73,};
u8 main_keys_key_array_52[] = {0x74,0x72,0x75,0x65,};
u8 main_keys_key_array_53[] = {0x75,0x6e,0x69,0x6f,0x6e,};
u8 main_keys_key_array_56[] = {0x70,0x72,0x6f,0x74,0x65,0x63,0x74,0x65,0x64,};
u8 main_keys_key_array_59[] = {0x63,0x68,0x61,0x72,};
u8 main_keys_key_array_60[] = {0x61,0x73,0x6d,};
u8 main_keys_key_array_62[] = {0x74,0x79,0x70,0x65,0x64,0x65,0x66,};
u8 main_keys_key_array_64[] = {0x76,0x6f,0x6c,0x61,0x74,0x69,0x6c,0x65,};
u8 main_keys_key_array_65[] = {0x74,0x72,0x79,};
u8 main_keys_key_array_68[] = {0x64,0x65,0x63,0x6c,0x74,0x79,0x70,0x65,};
u8 main_keys_key_array_69[] = {0x73,0x69,0x67,0x6e,0x65,0x64,};
u8 main_keys_key_array_71[] = {0x75,0x6e,0x73,0x69,0x67,0x6e,0x65,0x64,};
u8 main_keys_key_array_73[] = {0x63,0x6f,0x6e,0x74,0x69,0x6e,0x75,0x65,};
u8 main_keys_key_array_74[] = {0x67,0x6f,0x74,0x6f,};
u8 main_keys_key_array_76[] = {0x62,0x6f,0x6f,0x6c,};
u8 main_keys_key_array_77[] = {0x64,0x65,0x6c,0x65,0x74,0x65,};
u8 main_keys_key_array_79[] = {0x64,0x6f,0x75,0x62,0x6c,0x65,};
u8 main_keys_key_array_80[] = {0x73,0x69,0x7a,0x65,0x6f,0x66,};
u8 main_keys_key_array_81[] = {0x74,0x65,0x6d,0x70,0x6c,0x61,0x74,0x65,};
u8 main_keys_key_array_82[] = {0x6c,0x6f,0x6e,0x67,};
u8 main_keys_key_array_83[] = {0x6e,0x6f,0x65,0x78,0x63,0x65,0x70,0x74,};
u8 main_keys_key_array_85[] = {0x66,0x6c,0x6f,0x61,0x74,};
u8 main_keys_key_array_86[] = {0x64,0x65,0x66,0x61,0x75,0x6c,0x74,};
u8 main_keys_key_array_87[] = {0x6e,0x61,0x6d,0x65,0x73,0x70,0x61,0x63,0x65,};
u8 main_keys_key_array_89[] = {0x65,0x78,0x74,0x65,0x72,0x6e,};
u8 main_keys_key_array_90[] = {0x74,0x68,0x72,0x65,0x61,0x64,0x5f,0x6c,0x6f,0x63,0x61,0x6c,};
u8 main_keys_key_array_91[] = {0x73,0x74,0x61,0x74,0x69,0x63,0x5f,0x63,0x61,0x73,0x74,};
u8 main_keys_key_array_92[] = {0x73,0x74,0x72,0x75,0x63,0x74,};
u8 main_keys_key_array_93[] = {0x74,0x79,0x70,0x65,0x69,0x64,};
u8 main_keys_key_array_96[] = {0x63,0x6f,0x6e,0x73,0x74,};
u8 main_keys_key_array_98[] = {0x66,0x6f,0x72,};
u8 main_keys_key_array_99[] = {0x70,0x72,0x69,0x76,0x61,0x74,0x65,};
u8 main_keys_key_array_100[] = {0x63,0x61,0x74,0x63,0x68,};
u8 main_keys_key_array_103[] = {0x61,0x6c,0x69,0x67,0x6e,0x61,0x73,};
u8 main_keys_key_array_105[] = {0x72,0x65,0x74,0x75,0x72,0x6e,};
u8 main_keys_key_array_106[] = {0x75,0x73,0x69,0x6e,0x67,};
u8 main_keys_key_array_107[] = {0x65,0x6e,0x75,0x6d,};
u8 main_keys_key_array_109[] = {0x72,0x65,0x67,0x69,0x73,0x74,0x65,0x72,};
u8 main_keys_key_array_110[] = {0x74,0x68,0x69,0x73,};
u8 main_keys_key_array_112[] = {0x73,0x77,0x69,0x74,0x63,0x68,};
u8 main_keys_key_array_114[] = {0x77,0x68,0x69,0x6c,0x65,};
String_Const_u8 main_keys_key_array[115] = {
{main_keys_key_array_0, 6},
{0, 0},
{0, 0},
{main_keys_key_array_17, 5},
{main_keys_key_array_3, 4},
{0, 0},
{main_keys_key_array_19, 5},
{0, 0},
{main_keys_key_array_21, 8},
{0, 0},
{main_keys_key_array_23, 6},
{main_keys_key_array_24, 7},
{main_keys_key_array_25, 8},
{main_keys_key_array_26, 6},
{main_keys_key_array_27, 8},
{0, 0},
{main_keys_key_array_29, 4},
{main_keys_key_array_30, 4},
{main_keys_key_array_31, 8},
{main_keys_key_array_32, 4},
{main_keys_key_array_5, 8},
{main_keys_key_array_6, 2},
{0, 0},
{0, 0},
{0, 0},
{main_keys_key_array_10, 3},
{main_keys_key_array_11, 4},
{main_keys_key_array_12, 6},
{0, 0},
{0, 0},
{main_keys_key_array_38, 8},
{main_keys_key_array_39, 6},
{main_keys_key_array_40, 6},
{main_keys_key_array_41, 6},
{main_keys_key_array_15, 12},
{0, 0},
{main_keys_key_array_17, 10},
{main_keys_key_array_18, 6},
{0, 0},
{main_keys_key_array_20, 5},
{main_keys_key_array_21, 5},
{0, 0},
{main_keys_key_array_23, 16},
{0, 0},
{main_keys_key_array_25, 6},
{main_keys_key_array_26, 7},
{0, 0},
{0, 0},
{main_keys_key_array_44, 10},
{main_keys_key_array_29, 2},
{main_keys_key_array_30, 6},
{0, 0},
{0, 0},
{main_keys_key_array_47, 12},
{main_keys_key_array_33, 13},
{0, 0},
{0, 0},
{main_keys_key_array_36, 8},
{0, 0},
{0, 0},
{main_keys_key_array_39, 7},
{main_keys_key_array_40, 7},
{0, 0},
{0, 0},
{0, 0},
{main_keys_key_array_51, 3},
{0, 0},
{0, 0},
{main_keys_key_array_54, 4},
{main_keys_key_array_55, 5},
{main_keys_key_array_56, 5},
{0, 0},
{main_keys_key_array_58, 4},
{0, 0},
{0, 0},
{main_keys_key_array_61, 5},
{main_keys_key_array_62, 6},
{0, 0},
{0, 0},
{main_keys_key_array_65, 4},
{main_keys_key_array_66, 6},
{main_keys_key_array_67, 4},
{main_keys_key_array_68, 6},
{main_keys_key_array_44, 3},
{main_keys_key_array_45, 5},
{main_keys_key_array_46, 8},
{main_keys_key_array_47, 4},
{main_keys_key_array_48, 5},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{main_keys_key_array_73, 6},
{main_keys_key_array_74, 5},
{0, 0},
{main_keys_key_array_76, 8},
{0, 0},
{main_keys_key_array_78, 11},
{main_keys_key_array_52, 4},
{main_keys_key_array_53, 5},
{0, 0},
{0, 0},
{main_keys_key_array_81, 16},
{0, 0},
{main_keys_key_array_83, 3},
{main_keys_key_array_56, 9},
{0, 0},
{0, 0},
{main_keys_key_array_59, 4},
{main_keys_key_array_60, 3},
{0, 0},
{main_keys_key_array_62, 7},
{0, 0},
{main_keys_key_array_64, 8},
{main_keys_key_array_65, 3},
{0, 0},
{0, 0},
{main_keys_key_array_68, 8},
{main_keys_key_array_69, 6},
{0, 0},
{main_keys_key_array_71, 8},
{0, 0},
{main_keys_key_array_73, 8},
{main_keys_key_array_74, 4},
{0, 0},
{main_keys_key_array_76, 4},
{main_keys_key_array_77, 6},
{0, 0},
{main_keys_key_array_79, 6},
{main_keys_key_array_80, 6},
{main_keys_key_array_81, 8},
{main_keys_key_array_82, 4},
{main_keys_key_array_83, 8},
{0, 0},
{main_keys_key_array_85, 5},
{main_keys_key_array_86, 7},
{main_keys_key_array_87, 6},
{main_keys_key_array_88, 4},
{main_keys_key_array_89, 5},
{main_keys_key_array_87, 9},
{0, 0},
{main_keys_key_array_91, 2},
{0, 0},
{main_keys_key_array_93, 5},
{main_keys_key_array_94, 6},
{0, 0},
{main_keys_key_array_96, 7},
{0, 0},
{main_keys_key_array_98, 13},
{main_keys_key_array_99, 8},
{main_keys_key_array_100, 4},
{main_keys_key_array_89, 6},
{main_keys_key_array_90, 12},
{main_keys_key_array_91, 11},
{main_keys_key_array_92, 6},
{main_keys_key_array_93, 6},
{0, 0},
{0, 0},
{main_keys_key_array_96, 5},
{0, 0},
{main_keys_key_array_98, 3},
{main_keys_key_array_99, 7},
{main_keys_key_array_100, 5},
{0, 0},
{0, 0},
{main_keys_key_array_105, 7},
{main_keys_key_array_106, 7},
{main_keys_key_array_107, 9},
{0, 0},
{0, 0},
{0, 0},
{main_keys_key_array_111, 6},
{main_keys_key_array_112, 3},
{0, 0},
{main_keys_key_array_114, 8},
{main_keys_key_array_115, 3},
{main_keys_key_array_116, 6},
{main_keys_key_array_103, 7},
{0, 0},
{main_keys_key_array_105, 6},
{main_keys_key_array_106, 5},
{main_keys_key_array_107, 4},
{0, 0},
{main_keys_key_array_109, 8},
{main_keys_key_array_110, 4},
{0, 0},
{main_keys_key_array_112, 6},
{0, 0},
{main_keys_key_array_114, 5},
};
Lexeme_Table_Value main_keys_value_array[121] = {
{4, TokenCppKind_Volatile},
{4, TokenCppKind_AlignOf},
{0, 0},
{4, TokenCppKind_Signed},
{4, TokenCppKind_ThreadLocal},
{4, TokenCppKind_Int},
{4, TokenCppKind_Using},
{0, 0},
{4, TokenCppKind_Do},
{4, TokenCppKind_Protected},
{0, 0},
{4, TokenCppKind_Unsigned},
{4, TokenCppKind_Const},
{4, TokenCppKind_Enum},
{4, TokenCppKind_NullPtr},
{0, 0},
{0, 0},
{4, TokenCppKind_Catch},
{0, 0},
{4, TokenCppKind_Class},
{0, 0},
{4, TokenCppKind_Template},
{0, 0},
{4, TokenCppKind_Export},
{4, TokenCppKind_AlignAs},
{4, TokenCppKind_DeclType},
{4, TokenCppKind_SizeOf},
{4, TokenCppKind_Operator},
{0, 0},
{4, TokenCppKind_Goto},
{4, TokenCppKind_Long},
{4, TokenCppKind_NoExcept},
{8, TokenCppKind_LiteralTrue},
{0, 0},
{0, 0},
Lexeme_Table_Value main_keys_value_array[115] = {
{4, TokenCppKind_Public},
{0, 0},
{0, 0},
{4, TokenCppKind_Case},
{0, 0},
{4, TokenCppKind_Explicit},
{4, TokenCppKind_Double},
{4, TokenCppKind_Switch},
{4, TokenCppKind_Inline},
{4, TokenCppKind_Do},
{0, 0},
{0, 0},
{4, TokenCppKind_ConstCast},
{0, 0},
{4, TokenCppKind_New},
{4, TokenCppKind_Else},
{4, TokenCppKind_Export},
{0, 0},
{0, 0},
{4, TokenCppKind_DynamicCast},
{0, 0},
{4, TokenCppKind_ConstCast},
{4, TokenCppKind_Inline},
{0, 0},
{0, 0},
{4, TokenCppKind_For},
{0, 0},
{0, 0},
{4, TokenCppKind_Case},
{4, TokenCppKind_Short},
{4, TokenCppKind_Break},
{0, 0},
{4, TokenCppKind_Void},
{0, 0},
{0, 0},
{4, TokenCppKind_Union},
{4, TokenCppKind_Delete},
{0, 0},
{0, 0},
{4, TokenCppKind_Bool},
{4, TokenCppKind_Extern},
{4, TokenCppKind_Else},
{4, TokenCppKind_Friend},
{0, 0},
{0, 0},
{0, 0},
{0, 0},
{4, TokenCppKind_Public},
{4, TokenCppKind_Float},
{0, 0},
{4, TokenCppKind_Register},
{0, 0},
{4, TokenCppKind_StaticCast},
{0, 0},
{8, TokenCppKind_LiteralFalse},
{0, 0},
{4, TokenCppKind_ReinterpretCast},
{0, 0},
{4, TokenCppKind_Asm},
{4, TokenCppKind_Static},
{4, TokenCppKind_NullPtr},
{0, 0},
{0, 0},
{4, TokenCppKind_Typedef},
{4, TokenCppKind_TypeID},
{4, TokenCppKind_This},
{8, TokenCppKind_LiteralFalse},
{0, 0},
{4, TokenCppKind_If},
{4, TokenCppKind_Friend},
{0, 0},
{4, TokenCppKind_While},
{4, TokenCppKind_Return},
{0, 0},
{4, TokenCppKind_Virtual},
{0, 0},
{4, TokenCppKind_StaticAssert},
{0, 0},
{0, 0},
{4, TokenCppKind_Operator},
{0, 0},
{0, 0},
{4, TokenCppKind_Virtual},
{4, TokenCppKind_AlignOf},
{0, 0},
{0, 0},
{0, 0},
{4, TokenCppKind_Int},
{4, TokenCppKind_Short},
{4, TokenCppKind_Typename},
{4, TokenCppKind_Void},
{4, TokenCppKind_Class},
{0, 0},
{0, 0},
{0, 0},
{8, TokenCppKind_LiteralTrue},
{4, TokenCppKind_Union},
{0, 0},
{0, 0},
{4, TokenCppKind_Protected},
{0, 0},
{0, 0},
{4, TokenCppKind_Char},
{4, TokenCppKind_Asm},
{0, 0},
{4, TokenCppKind_Typedef},
{0, 0},
{4, TokenCppKind_Volatile},
{4, TokenCppKind_Try},
{0, 0},
{0, 0},
{4, TokenCppKind_DeclType},
{4, TokenCppKind_Signed},
{0, 0},
{4, TokenCppKind_Unsigned},
{0, 0},
{4, TokenCppKind_Private},
{4, TokenCppKind_Continue},
{4, TokenCppKind_Goto},
{0, 0},
{4, TokenCppKind_Bool},
{4, TokenCppKind_Delete},
{0, 0},
{4, TokenCppKind_Double},
{4, TokenCppKind_SizeOf},
{4, TokenCppKind_Template},
{4, TokenCppKind_Long},
{4, TokenCppKind_NoExcept},
{0, 0},
{4, TokenCppKind_Float},
{4, TokenCppKind_Default},
{4, TokenCppKind_Namespace},
{0, 0},
{0, 0},
{0, 0},
{4, TokenCppKind_Extern},
{4, TokenCppKind_ThreadLocal},
{4, TokenCppKind_StaticCast},
{4, TokenCppKind_Struct},
{4, TokenCppKind_New},
{0, 0},
{4, TokenCppKind_Continue},
{4, TokenCppKind_Try},
{4, TokenCppKind_Static},
{4, TokenCppKind_TypeID},
{0, 0},
{0, 0},
{4, TokenCppKind_Const},
{0, 0},
{4, TokenCppKind_For},
{4, TokenCppKind_Private},
{4, TokenCppKind_Catch},
{0, 0},
{0, 0},
{4, TokenCppKind_AlignAs},
{0, 0},
{4, TokenCppKind_Return},
{4, TokenCppKind_Using},
{4, TokenCppKind_Enum},
{0, 0},
{4, TokenCppKind_Register},
{4, TokenCppKind_This},
{0, 0},
{4, TokenCppKind_Switch},
{0, 0},
{4, TokenCppKind_While},
};
i32 main_keys_slot_count = 121;
u64 main_keys_seed = 0x4e71603d6bab78be;
i32 main_keys_slot_count = 115;
u64 main_keys_seed = 0x16bfab524fa54382;
u64 pp_directives_hash_array[25] = {
0x11557879e6f0ea77,0x660a16e8e3deeead,0x6ce110cd12875a1f,0x0000000000000000,
0x05d53bc1ed49019f,0xe0ea3af73f832cff,0x660a16e8e388da77,0x0000000000000000,
0x0000000000000000,0x1155675ee54cd183,0x11557878a3b561f3,0x0000000000000000,
0xe0eb9286644bb223,0x115578679cce8ad9,0x0000000000000000,0x0000000000000000,
0x660a16e8efe01327,0x0000000000000000,0x660a16e8ebbdd277,0x6ce110cd1279b983,
0x6ce110cd128723fd,0x0000000000000000,0x660a16e8ecb496bf,0x0000000000000000,
0xb609da307054bea3,0x0000000000000000,0x0000000000000000,0xa2e78356ab03f40f,
0x0000000000000000,0x0ee3d6653314ef87,0x0000000000000000,0xa2e7835774c1adef,
0x0ee3d660cdba6a31,0xa2e783568162a20f,0x8736de7657610e07,0x0000000000000000,
0x0ee3d660cf11c00f,0xb609da3070f19257,0xa2e7835772fe8f57,0x0000000000000000,
0xb609da3070f19323,0x0ee3d633c7a04603,0x0000000000000000,0x0000000000000000,
0x81c8a8b11ba92f2b,0xa2e78356842fa881,0x0000000000000000,0x81c8aed73449609b,
0x0000000000000000,
};
u8 pp_directives_key_array_0[] = {0x69,0x66,0x6e,0x64,0x65,0x66,};
u8 pp_directives_key_array_1[] = {0x75,0x73,0x69,0x6e,0x67,};
u8 pp_directives_key_array_2[] = {0x65,0x6c,0x69,0x66,};
u8 pp_directives_key_array_4[] = {0x69,0x66,};
u8 pp_directives_key_array_5[] = {0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,};
u8 pp_directives_key_array_6[] = {0x75,0x6e,0x64,0x65,0x66,};
u8 pp_directives_key_array_9[] = {0x64,0x65,0x66,0x69,0x6e,0x65,};
u8 pp_directives_key_array_10[] = {0x69,0x6d,0x70,0x6f,0x72,0x74,};
u8 pp_directives_key_array_12[] = {0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,};
u8 pp_directives_key_array_13[] = {0x70,0x72,0x61,0x67,0x6d,0x61,};
u8 pp_directives_key_array_16[] = {0x65,0x72,0x72,0x6f,0x72,};
u8 pp_directives_key_array_18[] = {0x69,0x66,0x64,0x65,0x66,};
u8 pp_directives_key_array_19[] = {0x6c,0x69,0x6e,0x65,};
u8 pp_directives_key_array_20[] = {0x65,0x6c,0x73,0x65,};
u8 pp_directives_key_array_22[] = {0x65,0x6e,0x64,0x69,0x66,};
u8 pp_directives_key_array_0[] = {0x6c,0x69,0x6e,0x65,};
u8 pp_directives_key_array_3[] = {0x69,0x66,0x64,0x65,0x66,};
u8 pp_directives_key_array_5[] = {0x70,0x72,0x61,0x67,0x6d,0x61,};
u8 pp_directives_key_array_7[] = {0x65,0x72,0x72,0x6f,0x72,};
u8 pp_directives_key_array_8[] = {0x69,0x6d,0x70,0x6f,0x72,0x74,};
u8 pp_directives_key_array_9[] = {0x75,0x6e,0x64,0x65,0x66,};
u8 pp_directives_key_array_10[] = {0x69,0x66,};
u8 pp_directives_key_array_12[] = {0x69,0x66,0x6e,0x64,0x65,0x66,};
u8 pp_directives_key_array_13[] = {0x65,0x6c,0x69,0x66,};
u8 pp_directives_key_array_14[] = {0x65,0x6e,0x64,0x69,0x66,};
u8 pp_directives_key_array_16[] = {0x65,0x6c,0x73,0x65,};
u8 pp_directives_key_array_17[] = {0x64,0x65,0x66,0x69,0x6e,0x65,};
u8 pp_directives_key_array_20[] = {0x76,0x65,0x72,0x73,0x69,0x6f,0x6e,};
u8 pp_directives_key_array_21[] = {0x75,0x73,0x69,0x6e,0x67,};
u8 pp_directives_key_array_23[] = {0x69,0x6e,0x63,0x6c,0x75,0x64,0x65,};
String_Const_u8 pp_directives_key_array[25] = {
{pp_directives_key_array_0, 6},
{pp_directives_key_array_1, 5},
{pp_directives_key_array_2, 4},
{0, 0},
{pp_directives_key_array_4, 2},
{pp_directives_key_array_5, 7},
{pp_directives_key_array_6, 5},
{pp_directives_key_array_0, 4},
{0, 0},
{0, 0},
{pp_directives_key_array_9, 6},
{pp_directives_key_array_10, 6},
{pp_directives_key_array_3, 5},
{0, 0},
{pp_directives_key_array_12, 7},
{pp_directives_key_array_13, 6},
{pp_directives_key_array_5, 6},
{0, 0},
{pp_directives_key_array_7, 5},
{pp_directives_key_array_8, 6},
{pp_directives_key_array_9, 5},
{pp_directives_key_array_10, 2},
{0, 0},
{pp_directives_key_array_12, 6},
{pp_directives_key_array_13, 4},
{pp_directives_key_array_14, 5},
{0, 0},
{pp_directives_key_array_16, 4},
{pp_directives_key_array_17, 6},
{0, 0},
{0, 0},
{pp_directives_key_array_16, 5},
{0, 0},
{pp_directives_key_array_18, 5},
{pp_directives_key_array_19, 4},
{pp_directives_key_array_20, 4},
{0, 0},
{pp_directives_key_array_22, 5},
{pp_directives_key_array_20, 7},
{pp_directives_key_array_21, 5},
{0, 0},
{pp_directives_key_array_23, 7},
{0, 0},
};
Lexeme_Table_Value pp_directives_value_array[25] = {
{5, TokenCppKind_PPIfNDef},
{5, TokenCppKind_PPUsing},
{5, TokenCppKind_PPElIf},
{5, TokenCppKind_PPLine},
{0, 0},
{5, TokenCppKind_PPIf},
{5, TokenCppKind_PPVersion},
{5, TokenCppKind_PPUndef},
{0, 0},
{0, 0},
{5, TokenCppKind_PPDefine},
{5, TokenCppKind_PPImport},
{0, 0},
{5, TokenCppKind_PPInclude},
{5, TokenCppKind_PPPragma},
{0, 0},
{0, 0},
{5, TokenCppKind_PPError},
{0, 0},
{5, TokenCppKind_PPIfDef},
{5, TokenCppKind_PPLine},
{5, TokenCppKind_PPElse},
{0, 0},
{5, TokenCppKind_PPPragma},
{0, 0},
{5, TokenCppKind_PPError},
{5, TokenCppKind_PPImport},
{5, TokenCppKind_PPUndef},
{5, TokenCppKind_PPIf},
{0, 0},
{5, TokenCppKind_PPIfNDef},
{5, TokenCppKind_PPElIf},
{5, TokenCppKind_PPEndIf},
{0, 0},
{5, TokenCppKind_PPElse},
{5, TokenCppKind_PPDefine},
{0, 0},
{0, 0},
{5, TokenCppKind_PPVersion},
{5, TokenCppKind_PPUsing},
{0, 0},
{5, TokenCppKind_PPInclude},
{0, 0},
};
i32 pp_directives_slot_count = 25;
u64 pp_directives_seed = 0xf30c26e2b8e4ff9e;
u64 pp_directives_seed = 0x20a9103cfa5a977d;
u64 pp_keys_hash_array[2] = {
0x0000000000000000,0xee296b9aa9ca2a41,
0x0000000000000000,0xd488faf5597fb9a7,
};
u8 pp_keys_key_array_1[] = {0x64,0x65,0x66,0x69,0x6e,0x65,0x64,};
String_Const_u8 pp_keys_key_array[2] = {
@ -483,7 +469,7 @@ Lexeme_Table_Value pp_keys_value_array[2] = {
{4, TokenCppKind_PPDefined},
};
i32 pp_keys_slot_count = 2;
u64 pp_keys_seed = 0x83e4bc6eb147cac1;
u64 pp_keys_seed = 0x69b39c166d6f6c83;
internal Token_List
lex_full_input_cpp(Arena *arena, String_Const_u8 input){
Token_List list = {};