package core:c/frontend/preprocessor

⌘K
Ctrl+K
or
/

    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

    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 {…}

    append_token ¶

    append_token :: proc(a, b: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}

    check_for_include_guard ¶

    check_for_include_guard :: proc(tok: ^c_frontend_tokenizer.Token) -> (guard: string, ok: bool) {…}

    const_expr ¶

    const_expr :: proc(rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> i64 {…}

    consume ¶

    consume :: proc(rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token, lit: string) -> bool {…}

    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) {…}

    copy_line ¶

    copy_line :: proc(rest: ^^c_frontend_tokenizer.Token, tok: ^c_frontend_tokenizer.Token) -> ^c_frontend_tokenizer.Token {…}

    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_arg ¶

    find_arg :: proc(args: ^Macro_Arg, tok: ^c_frontend_tokenizer.Token) -> ^Macro_Arg {…}

    find_macro ¶

    find_macro :: proc(cpp: ^Preprocessor, tok: ^c_frontend_tokenizer.Token) -> ^Macro {…}

    from_hex ¶

    from_hex :: proc(x: u8) -> i32 {…}

    has_varargs ¶

    has_varargs :: proc(args: ^Macro_Arg) -> bool {…}

    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) {…}

    is_hash ¶

    is_hash :: proc(tok: ^c_frontend_tokenizer.Token) -> bool {…}

    is_hex_digit ¶

    is_hex_digit :: proc(x: u8) -> bool {…}

    join_adjacent_string_literals ¶

    join_adjacent_string_literals :: proc(cpp: ^Preprocessor, initial_tok: ^c_frontend_tokenizer.Token) {…}

    join_tokens ¶

    join_tokens :: proc(tok, end: ^c_frontend_tokenizer.Token) -> string {…}

    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 {…}

    quote_string ¶

    quote_string :: proc(s: string) -> []u8 {…}

    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_cond_incl ¶

    skip_cond_incl :: proc(tok: ^c_frontend_tokenizer.Token) -> ^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_char ¶

    unquote_char :: proc(str: string, quote: u8) -> (r: rune, multiple_bytes: bool, tail_string: string, success: bool) {…}

    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