2018-05-09 07:10:07 +00:00
|
|
|
/*
|
|
|
|
4coder_auto_indent.h - Auto-indentation types.
|
|
|
|
*/
|
|
|
|
|
|
|
|
// TOP
|
|
|
|
|
|
|
|
#if !defined(FCODER_AUTO_INDENT_H)
|
|
|
|
#define FCODER_AUTO_INDENT_H
|
|
|
|
|
|
|
|
struct Indent_Options{
|
2019-02-26 23:08:42 +00:00
|
|
|
b32 empty_blank_lines;
|
|
|
|
b32 use_tabs;
|
|
|
|
i32 tab_width;
|
2018-05-09 07:10:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Indent_Parse_State{
|
2019-06-20 23:43:27 +00:00
|
|
|
i64 current_indent;
|
|
|
|
i64 previous_line_indent;
|
|
|
|
i64 paren_nesting;
|
|
|
|
i64 paren_anchor_indent[16];
|
|
|
|
i64 comment_shift;
|
|
|
|
i64 previous_comment_indent;
|
2018-05-09 07:10:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
struct Indent_Anchor_Position{
|
|
|
|
Cpp_Token *token;
|
2019-02-26 23:08:42 +00:00
|
|
|
i32 indentation;
|
2018-05-09 07:10:07 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
#endif
|
|
|
|
|
|
|
|
// BOTTOM
|
|
|
|
|