package core:c/frontend/preprocessor
⌘K
Ctrl+K
or
/
Index
Constants (1)
Variables (0)
This section is empty.
Procedures (57)
- add_builtin
- add_macro
- append_token
- check_for_include_guard
- const_expr
- consume
- convert_pp_char
- convert_pp_number
- convert_pp_string
- convert_pp_token
- convert_pp_tokens
- copy_line
- counter_macro
- define_macro
- error
- eval_const_expr
- expand_macro
- file_macro
- find_arg
- find_macro
- from_hex
- has_varargs
- include_file
- init_default_macros
- init_defaults
- init_lookup_tables
- is_hash
- is_hex_digit
- join_adjacent_string_literals
- join_tokens
- line_macro
- new_number_token
- new_string_token
- paste
- preprocess
- preprocess_internal
- push_cond_incl
- quote_string
- read_const_expr
- read_include_filename
- read_line_marker
- read_macro_arg_one
- read_macro_args
- read_macro_definition
- read_macro_params
- search_include_next
- search_include_paths
- skip
- skip_cond_incl
- skip_line
- stringize
- substitute_token
- undef_macro
- unquote_char
- unquote_string
- warn
- wide_char_size
Procedure Groups (0)
This section is empty.
Types
Cond_Incl ¶
Cond_Incl :: struct { next: ^Cond_Incl, tok: ^c_frontend_tokenizer.Token, state: Cond_Incl_State, included: bool, }
Related Procedures With Returns
Cond_Incl_State ¶
Cond_Incl_State :: enum u8 { In_Then, In_Elif, In_Else, }
Error_Handler ¶
Error_Handler :: c_frontend_tokenizer.Error_Handler
Macro ¶
Macro :: struct { name: string, kind: Macro_Kind, params: ^Macro_Param, va_args_name: string, body: ^c_frontend_tokenizer.Token, handler: Macro_Handler, }
Related Procedures With Returns
Macro_Arg ¶
Macro_Arg :: struct { next: ^Macro_Arg, name: string, tok: ^c_frontend_tokenizer.Token, is_va_args: bool, }
Related Procedures With Parameters
Related Procedures With Returns
Macro_Handler ¶
Macro_Handler :: proc(^Preprocessor, ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token
Related Procedures With Parameters
Macro_Kind ¶
Macro_Kind :: enum u8 { Function_Like, Value_Like, }
Related Procedures With Parameters
Macro_Param ¶
Macro_Param :: struct { next: ^Macro_Param, name: string, }
Related Procedures With Parameters
Related Procedures With Returns
Pragma_Handler ¶
Pragma_Handler :: proc(^Preprocessor, ^c_frontend_tokenizer.Token)
Preprocessor ¶
Preprocessor :: struct { // Lookup tables macros: map[string]^Macro, pragma_once: map[string]bool, include_guards: map[string]string, filepath_cache: map[string]string, // Include path data include_paths: []string, // Counter for __COUNTER__ macro counter: i64, // Include information cond_incl: ^Cond_Incl, include_level: int, include_next_index: int, wide_char_size: int, // Mutable data err: c_frontend_tokenizer.Error_Handler, warn: c_frontend_tokenizer.Error_Handler, pragma_handler: Pragma_Handler, error_count: int, warning_count: int, }
Related Procedures With Parameters
- add_builtin
- add_macro
- convert_pp_string
- convert_pp_token
- convert_pp_tokens
- counter_macro
- define_macro
- error
- eval_const_expr
- expand_macro
- file_macro
- find_macro
- include_file
- init_default_macros
- init_defaults
- init_lookup_tables
- join_adjacent_string_literals
- line_macro
- new_number_token
- new_string_token
- paste
- preprocess
- preprocess_internal
- push_cond_incl
- read_const_expr
- read_include_filename
- read_line_marker
- read_macro_arg_one
- read_macro_args
- read_macro_definition
- read_macro_params
- search_include_next
- search_include_paths
- skip
- skip_line
- stringize
- substitute_token
- undef_macro
- warn
- wide_char_size
Constants
MAX_INCLUDE_LEVEL ¶
MAX_INCLUDE_LEVEL :: 1024
Variables
This section is empty.
Procedures
add_builtin ¶
add_builtin :: proc(cpp: ^Preprocessor, name: string, handler: Macro_Handler) -> ^Macro {…}
add_macro ¶
add_macro :: proc(cpp: ^Preprocessor, name: string, kind: Macro_Kind, body: ^c_frontend_tokenizer.Token) -> ^Macro {…}
convert_pp_char ¶
convert_pp_char :: proc(tok: ^c_frontend_tokenizer.Token) {…}
convert_pp_number ¶
convert_pp_number :: proc(tok: ^c_frontend_tokenizer.Token) {…}
convert_pp_string ¶
convert_pp_string :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) {…}
convert_pp_token ¶
convert_pp_token :: proc(cpp: ^Preprocessor, t: ^c_frontend_tokenizer.Token, is_keyword: c_frontend_tokenizer.Is_Keyword_Proc) {…}
convert_pp_tokens ¶
convert_pp_tokens :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, is_keyword: c_frontend_tokenizer.Is_Keyword_Proc) {…}
counter_macro ¶
counter_macro :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
define_macro ¶
define_macro :: proc(cpp: ^Preprocessor, name, def: string) {…}
error ¶
error :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, msg: string, .. args: ..any) {…}
eval_const_expr ¶
eval_const_expr :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> (val: i64) {…}
expand_macro ¶
expand_macro :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> bool {…}
file_macro ¶
file_macro :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
find_macro ¶
find_macro :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^Macro {…}
include_file ¶
include_file :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, path: string, filename_tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
init_default_macros ¶
init_default_macros :: proc(cpp: ^Preprocessor) {…}
init_defaults ¶
init_defaults :: proc(cpp: ^Preprocessor, lookup_tables_allocator := context.allocator) {…}
init_lookup_tables ¶
init_lookup_tables :: proc(cpp: ^Preprocessor, allocator := context.allocator) {…}
join_adjacent_string_literals ¶
join_adjacent_string_literals :: proc(cpp: ^Preprocessor, initial_tok: ^c_frontend_tokenizer.Token) {…}
line_macro ¶
line_macro :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
new_number_token ¶
new_number_token :: proc(cpp: ^Preprocessor, i: i64, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
new_string_token ¶
new_string_token :: proc(cpp: ^Preprocessor, str: string, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
paste ¶
paste :: proc(cpp: ^Preprocessor, lhs, rhs: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
preprocess ¶
preprocess :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
preprocess_internal ¶
preprocess_internal :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
push_cond_incl ¶
push_cond_incl :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, included: bool) -> ^Cond_Incl {…}
read_const_expr ¶
read_const_expr :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
read_include_filename ¶
read_include_filename :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> (filename: string, is_quote: bool) {…}
read_line_marker ¶
read_line_marker :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) {…}
read_macro_arg_one ¶
read_macro_arg_one :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token, read_rest: bool) -> ^Macro_Arg {…}
read_macro_args ¶
read_macro_args :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token, params: ^Macro_Param, va_args_name: string) -> ^Macro_Arg {…}
read_macro_definition ¶
read_macro_definition :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) {…}
read_macro_params ¶
read_macro_params :: proc(cpp: ^Preprocessor, rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> (param: ^Macro_Param, va_args_name: string) {…}
search_include_next ¶
search_include_next :: proc(cpp: ^Preprocessor, filename: string) -> (path: string, ok: bool) {…}
search_include_paths ¶
search_include_paths :: proc(cpp: ^Preprocessor, filename: string) -> (path: string, ok: bool) {…}
skip ¶
skip :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, op: string) -> ^c_frontend_tokenizer.Token {…}
skip_line ¶
skip_line :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
stringize ¶
stringize :: proc(cpp: ^Preprocessor, hash, arg: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}
substitute_token ¶
substitute_token :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, args: ^Macro_Arg) -> ^c_frontend_tokenizer.Token {…}
undef_macro ¶
undef_macro :: proc(cpp: ^Preprocessor, name: string) {…}
unquote_string ¶
unquote_string :: proc(lit: string, allocator := context.allocator) -> (res: string, allocated, success: bool) {…}
warn ¶
warn :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token, msg: string, .. args: ..any) {…}
wide_char_size ¶
wide_char_size :: proc(cpp: ^Preprocessor) -> int {…}
Procedure Groups
This section is empty.
Source Files
Generation Information
Generated with odin version dev-2024-11 (vendor "odin") Windows_amd64 @ 2024-11-16 21:10:09.758795100 +0000 UTC