2017-01-23 06:19:43 +00:00
|
|
|
/*
|
2017-04-15 21:47:23 +00:00
|
|
|
4coder_default_framework.cpp - Sets up the basics of the framework that is used for default 4coder behaviour.
|
2017-01-23 06:19:43 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FCODER_DEFAULT_FRAMEWORK_H)
|
|
|
|
#define FCODER_DEFAULT_FRAMEWORK_H
|
|
|
|
|
|
|
|
#include "4coder_helper/4coder_helper.h"
|
|
|
|
#include "4coder_lib/4coder_mem.h"
|
2017-11-21 00:35:35 +00:00
|
|
|
#include "4coder_lib/4cpp_lexer.h"
|
2017-01-29 00:03:23 +00:00
|
|
|
|
|
|
|
enum Default_Maps{
|
|
|
|
default_code_map,
|
2018-05-07 02:47:22 +00:00
|
|
|
default_maps_count,
|
2017-01-29 00:03:23 +00:00
|
|
|
};
|
2017-01-23 06:19:43 +00:00
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-23 06:19:43 +00:00
|
|
|
|
|
|
|
enum Rewrite_Type{
|
|
|
|
RewriteNone,
|
|
|
|
RewritePaste,
|
|
|
|
RewriteWordComplete
|
|
|
|
};
|
|
|
|
|
|
|
|
struct View_Paste_Index{
|
|
|
|
int32_t rewrite;
|
|
|
|
int32_t next_rewrite;
|
|
|
|
int32_t index;
|
|
|
|
};
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2017-04-15 21:47:23 +00:00
|
|
|
struct ID_Based_Jump_Location{
|
2017-01-29 00:03:23 +00:00
|
|
|
int32_t buffer_id;
|
|
|
|
int32_t line;
|
|
|
|
int32_t column;
|
2017-04-15 21:47:23 +00:00
|
|
|
};
|
2017-01-29 00:03:23 +00:00
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-29 00:03:23 +00:00
|
|
|
|
|
|
|
struct Config_Line{
|
|
|
|
Cpp_Token id_token;
|
|
|
|
Cpp_Token subscript_token;
|
|
|
|
Cpp_Token eq_token;
|
|
|
|
Cpp_Token val_token;
|
|
|
|
int32_t val_array_start;
|
|
|
|
int32_t val_array_end;
|
|
|
|
int32_t val_array_count;
|
2017-11-15 00:06:00 +00:00
|
|
|
String error_str;
|
2017-01-29 00:03:23 +00:00
|
|
|
bool32 read_success;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Config_Item{
|
|
|
|
Config_Line line;
|
|
|
|
Cpp_Token_Array array;
|
|
|
|
char *mem;
|
|
|
|
String id;
|
|
|
|
int32_t subscript_index;
|
|
|
|
bool32 has_subscript;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct Config_Array_Reader{
|
|
|
|
Cpp_Token_Array array;
|
|
|
|
char *mem;
|
2017-03-23 19:16:39 +00:00
|
|
|
int32_t i;
|
|
|
|
int32_t val_array_end;
|
2017-01-29 00:03:23 +00:00
|
|
|
bool32 good;
|
|
|
|
};
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-11-08 18:24:30 +00:00
|
|
|
|
|
|
|
struct Named_Mapping{
|
|
|
|
String name;
|
|
|
|
Custom_Command_Function *remap_command;
|
|
|
|
};
|
|
|
|
|
2018-05-09 07:10:07 +00:00
|
|
|
////////////////////////////////
|
2017-01-30 17:02:05 +00:00
|
|
|
|
2018-05-09 05:22:33 +00:00
|
|
|
struct Extension_List{
|
|
|
|
char space[256];
|
|
|
|
char *exts[94];
|
|
|
|
int32_t count;
|
|
|
|
};
|
|
|
|
|
|
|
|
struct CString_Array{
|
|
|
|
char **strings;
|
|
|
|
int32_t count;
|
|
|
|
};
|
|
|
|
|
2017-01-23 06:19:43 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|