package core:odin/parser

⌘K
Ctrl+K
or
/

    Index

    Variables (0)

    This section is empty.

    Procedures (92)
    Procedure Groups (1)

    Types

    Build_Kind ¶

    Build_Kind :: struct {
    	os:   bit_set[.Odin_OS_Type],
    	arch: bit_set[.Odin_Arch_Type],
    }
    Related Constants

    Build_Target ¶

    Build_Target :: struct {
    	os:           .Odin_OS_Type,
    	arch:         .Odin_Arch_Type,
    	project_name: string,
    }
    Related Procedures With Parameters

    Error_Handler ¶

    Error_Handler :: proc(pos: odin_tokenizer.Pos, fmt: string, .. args: ..any)

    Expr_And_Flags ¶

    Expr_And_Flags :: struct {
    	expr:  ^odin_ast.Expr,
    	flags: odin_ast.Field_Flags,
    }

    File_Tags ¶

    File_Tags :: struct {
    	build_project_name: [][]string,
    	build:              []Build_Kind,
    	private:            Private_Flag,
    	ignore:             bool,
    	lazy:               bool,
    	no_instrumentation: bool,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    Flag ¶

    Flag :: enum u32 {
    	Optional_Semicolons, 
    }

    Flags ¶

    Flags :: distinct bit_set[Flag; u32]
    Related Procedures With Parameters

    Import_Decl_Kind ¶

    Import_Decl_Kind :: enum int {
    	Standard, 
    	Using, 
    }
    Related Procedures With Parameters

    Parser ¶

    Parser :: struct {
    	file:             ^odin_ast.File,
    	tok:              odin_tokenizer.Tokenizer,
    	// If .Optional_Semicolons is true, semicolons are completely as statement terminators
    	// different to .Insert_Semicolon in tok.flags
    	flags:            Flags,
    	warn:             Warning_Handler,
    	err:              Error_Handler,
    	prev_tok:         odin_tokenizer.Token,
    	curr_tok:         odin_tokenizer.Token,
    	// >= 0: In Expression
    	// <  0: In Control Clause
    	// NOTE(bill): Used to prevent type literals in control clauses
    	expr_level:       int,
    	allow_range:      bool,
    	// NOTE(bill): Ranges are only allowed in certain cases
    	allow_in_expr:    bool,
    	// NOTE(bill): in expression are only allowed in certain cases
    	in_foreign_block: bool,
    	allow_type:       bool,
    	lead_comment:     ^odin_ast.Comment_Group,
    	line_comment:     ^odin_ast.Comment_Group,
    	curr_proc:        ^odin_ast.Node,
    	error_count:      int,
    	fix_count:        int,
    	fix_prev_pos:     odin_tokenizer.Pos,
    	peeking:          bool,
    }
    Related Procedures With Parameters
    Related Procedures With Returns

    Private_Flag ¶

    Private_Flag :: enum int {
    	Public, 
    	Package, 
    	File, 
    }

    Stmt_Allow_Flag ¶

    Stmt_Allow_Flag :: enum int {
    	In, 
    	Label, 
    }

    Stmt_Allow_Flags ¶

    Stmt_Allow_Flags :: distinct bit_set[Stmt_Allow_Flag]
    Related Procedures With Parameters

    Warning_Handler ¶

    Warning_Handler :: proc(pos: odin_tokenizer.Pos, fmt: string, .. args: ..any)

    Constants

    BUILD_KIND_NEWLINE_MARKER ¶

    BUILD_KIND_NEWLINE_MARKER :: Build_Kind{}
     

    empty build kind acts as a marker for separating multiple lines with build tags

    MAX_FIX_COUNT ¶

    MAX_FIX_COUNT :: 10

    Variables

    This section is empty.

    Procedures

    advance_token ¶

    advance_token :: proc(p: ^Parser) -> odin_tokenizer.Token {…}

    allow_token ¶

    allow_token :: proc(p: ^Parser, kind: odin_tokenizer.Token_Kind) -> bool {…}

    check_field_flag_prefixes ¶

    check_field_flag_prefixes :: proc(p: ^Parser, name_count: int, allowed_flags, set_flags: odin_ast.Field_Flags) -> (flags: odin_ast.Field_Flags) {…}

    check_procedure_name_list ¶

    check_procedure_name_list :: proc(p: ^Parser, names: []^odin_ast.Expr) -> bool {…}

    collect_package ¶

    collect_package :: proc(path: string) -> (pkg: ^odin_ast.Package, success: bool) {…}

    consume_comment ¶

    consume_comment :: proc(p: ^Parser) -> (tok: odin_tokenizer.Token, end_line: int) {…}

    consume_comment_group ¶

    consume_comment_group :: proc(p: ^Parser, n: int) -> (comments: ^odin_ast.Comment_Group, end_line: int) {…}

    consume_comment_groups ¶

    consume_comment_groups :: proc(p: ^Parser, prev: odin_tokenizer.Token) {…}

    convert_stmt_to_body ¶

    convert_stmt_to_body :: proc(p: ^Parser, stmt: ^odin_ast.Stmt) -> ^odin_ast.Stmt {…}

    convert_stmt_to_expr ¶

    convert_stmt_to_expr :: proc(p: ^Parser, stmt: ^odin_ast.Stmt, kind: string) -> ^odin_ast.Expr {…}

    convert_to_ident_list ¶

    convert_to_ident_list :: proc(p: ^Parser, list: []Expr_And_Flags, ignore_flags, allow_poly_names: bool) -> []^odin_ast.Expr {…}

    default_error_handler ¶

    default_error_handler :: proc(pos: odin_tokenizer.Pos, msg: string, .. args: ..any) {…}

    default_parser ¶

    default_parser :: proc(flags: Flags = Flags{.Optional_Semicolons}) -> Parser {…}

    default_warning_handler ¶

    default_warning_handler :: proc(pos: odin_tokenizer.Pos, msg: string, .. args: ..any) {…}

    end_of_line_pos ¶

    end_of_line_pos :: proc(p: ^Parser, tok: odin_tokenizer.Token) -> odin_tokenizer.Pos {…}

    end_pos ¶

    end_pos :: proc(tok: odin_tokenizer.Token) -> odin_tokenizer.Pos {…}

    error ¶

    error :: proc(p: ^Parser, pos: odin_tokenizer.Pos, msg: string, .. args: ..any) {…}

    expect_closing_brace_of_field_list ¶

    expect_closing_brace_of_field_list :: proc(p: ^Parser) -> odin_tokenizer.Token {…}

    expect_closing_parentheses_of_field_list ¶

    expect_closing_parentheses_of_field_list :: proc(p: ^Parser) -> odin_tokenizer.Token {…}

    expect_closing_token_of_field_list ¶

    expect_closing_token_of_field_list :: proc(p: ^Parser, closing_kind: odin_tokenizer.Token_Kind, msg: string) -> odin_tokenizer.Token {…}

    expect_operator ¶

    expect_operator :: proc(p: ^Parser) -> odin_tokenizer.Token {…}

    expect_semicolon ¶

    expect_semicolon :: proc(p: ^Parser, node: ^odin_ast.Node) -> bool {…}

    expect_semicolon_newline_error ¶

    expect_semicolon_newline_error :: proc(p: ^Parser, token: odin_tokenizer.Token, s: ^odin_ast.Node) {…}

    expect_token ¶

    expect_token :: proc(p: ^Parser, kind: odin_tokenizer.Token_Kind) -> odin_tokenizer.Token {…}

    expect_token_after ¶

    expect_token_after :: proc(p: ^Parser, kind: odin_tokenizer.Token_Kind, msg: string) -> odin_tokenizer.Token {…}

    fix_advance_to_next_stmt ¶

    fix_advance_to_next_stmt :: proc(p: ^Parser) {…}

    get_build_arch_from_string ¶

    get_build_arch_from_string :: proc(str: string) -> .Odin_Arch_Type {…}

    get_build_os_from_string ¶

    get_build_os_from_string :: proc(str: string) -> .Odin_OS_Type {…}

    is_blank_ident_node ¶

    is_blank_ident_node :: proc(node: ^odin_ast.Node) -> bool {…}

    is_blank_ident_string ¶

    is_blank_ident_string :: proc(str: string) -> bool {…}

    is_blank_ident_token ¶

    is_blank_ident_token :: proc(tok: odin_tokenizer.Token) -> bool {…}

    is_literal_type ¶

    is_literal_type :: proc(expr: ^odin_ast.Expr) -> bool {…}

    is_non_inserted_semicolon ¶

    is_non_inserted_semicolon :: proc(tok: odin_tokenizer.Token) -> bool {…}

    is_package_name_reserved ¶

    is_package_name_reserved :: proc(name: string) -> bool {…}

    is_semicolon_optional_for_node ¶

    is_semicolon_optional_for_node :: proc(p: ^Parser, node: ^odin_ast.Node) -> bool {…}

    is_token_field_prefix ¶

    is_token_field_prefix :: proc(p: ^Parser) -> odin_ast.Field_Flag {…}

    match_build_tags ¶

    match_build_tags :: proc(file_tags: File_Tags, target: Build_Target) -> bool {…}

    new_ast_field ¶

    new_ast_field :: proc(names: []^odin_ast.Expr, type: ^odin_ast.Expr, default_value: ^odin_ast.Expr) -> ^odin_ast.Field {…}

    new_blank_ident ¶

    new_blank_ident :: proc(p: ^Parser, pos: odin_tokenizer.Pos) -> ^odin_ast.Ident {…}

    next_token0 ¶

    next_token0 :: proc(p: ^Parser) -> bool {…}

    parse_atom_expr ¶

    parse_atom_expr :: proc(p: ^Parser, value: ^odin_ast.Expr, lhs: bool) -> (operand: ^odin_ast.Expr) {…}

    parse_attribute ¶

    parse_attribute :: proc(p: ^Parser, tok: odin_tokenizer.Token, open_kind, close_kind: odin_tokenizer.Token_Kind, docs: ^odin_ast.Comment_Group) -> ^odin_ast.Stmt {…}

    parse_binary_expr ¶

    parse_binary_expr :: proc(p: ^Parser, lhs: bool, prec_in: int) -> ^odin_ast.Expr {…}

    parse_block_stmt ¶

    parse_block_stmt :: proc(p: ^Parser, is_when: bool) -> ^odin_ast.Stmt {…}

    parse_body ¶

    parse_body :: proc(p: ^Parser) -> ^odin_ast.Block_Stmt {…}

    parse_call_expr ¶

    parse_call_expr :: proc(p: ^Parser, operand: ^odin_ast.Expr) -> ^odin_ast.Expr {…}

    parse_case_clause ¶

    parse_case_clause :: proc(p: ^Parser, is_type_switch: bool) -> ^odin_ast.Case_Clause {…}

    parse_control_statement_semicolon_separator ¶

    parse_control_statement_semicolon_separator :: proc(p: ^Parser) -> bool {…}

    parse_elem_list ¶

    parse_elem_list :: proc(p: ^Parser) -> []^odin_ast.Expr {…}

    parse_expr ¶

    parse_expr :: proc(p: ^Parser, lhs: bool) -> ^odin_ast.Expr {…}

    parse_expr_list ¶

    parse_expr_list :: proc(p: ^Parser, lhs: bool) -> []^odin_ast.Expr {…}

    parse_field_list ¶

    parse_field_list :: proc(p: ^Parser, follow: odin_tokenizer.Token_Kind, allowed_flags: odin_ast.Field_Flags) -> (field_list: ^odin_ast.Field_List, total_name_count: int) {…}

    parse_field_prefixes ¶

    parse_field_prefixes :: proc(p: ^Parser) -> (flags: odin_ast.Field_Flags) {…}

    parse_file ¶

    parse_file :: proc(p: ^Parser, file: ^odin_ast.File) -> bool {…}

    parse_file_tags ¶

    parse_file_tags :: proc(file: odin_ast.File, allocator := context.allocator) -> (tags: File_Tags) {…}

    parse_for_stmt ¶

    parse_for_stmt :: proc(p: ^Parser) -> ^odin_ast.Stmt {…}

    parse_foreign_block ¶

    parse_foreign_block :: proc(p: ^Parser, tok: odin_tokenizer.Token) -> ^odin_ast.Foreign_Block_Decl {…}

    parse_foreign_block_decl ¶

    parse_foreign_block_decl :: proc(p: ^Parser) -> ^odin_ast.Stmt {…}

    parse_foreign_decl ¶

    parse_foreign_decl :: proc(p: ^Parser) -> ^odin_ast.Decl {…}

    parse_ident ¶

    parse_ident :: proc(p: ^Parser) -> ^odin_ast.Ident {…}

    parse_ident_list ¶

    parse_ident_list :: proc(p: ^Parser, allow_poly_names: bool) -> []^odin_ast.Expr {…}

    parse_if_stmt ¶

    parse_if_stmt :: proc(p: ^Parser) -> ^odin_ast.If_Stmt {…}

    parse_import_decl ¶

    parse_import_decl :: proc(p: ^Parser, kind: Import_Decl_Kind = Import_Decl_Kind.Standard) -> ^odin_ast.Import_Decl {…}

    parse_inlining_operand ¶

    parse_inlining_operand :: proc(p: ^Parser, lhs: bool, tok: odin_tokenizer.Token) -> ^odin_ast.Expr {…}

    parse_lhs_expr_list ¶

    parse_lhs_expr_list :: proc(p: ^Parser) -> []^odin_ast.Expr {…}

    parse_literal_value ¶

    parse_literal_value :: proc(p: ^Parser, type: ^odin_ast.Expr) -> ^odin_ast.Comp_Lit {…}

    parse_operand ¶

    parse_operand :: proc(p: ^Parser, lhs: bool) -> ^odin_ast.Expr {…}

    parse_package ¶

    parse_package :: proc(pkg: ^odin_ast.Package, p: ^Parser = nil) -> bool {…}

    parse_package_from_path ¶

    parse_package_from_path :: proc(path: string, p: ^Parser = nil) -> (pkg: ^odin_ast.Package, ok: bool) {…}

    parse_proc_tags ¶

    parse_proc_tags :: proc(p: ^Parser) -> (tags: odin_ast.Proc_Tags) {…}

    parse_proc_type ¶

    parse_proc_type :: proc(p: ^Parser, tok: odin_tokenizer.Token) -> ^odin_ast.Proc_Type {…}

    parse_results ¶

    parse_results :: proc(p: ^Parser) -> (list: ^odin_ast.Field_List, diverging: bool) {…}

    parse_rhs_expr_list ¶

    parse_rhs_expr_list :: proc(p: ^Parser) -> []^odin_ast.Expr {…}

    parse_simple_stmt ¶

    parse_simple_stmt :: proc(p: ^Parser, flags: Stmt_Allow_Flags) -> ^odin_ast.Stmt {…}

    parse_stmt ¶

    parse_stmt :: proc(p: ^Parser) -> ^odin_ast.Stmt {…}

    parse_stmt_list ¶

    parse_stmt_list :: proc(p: ^Parser) -> []^odin_ast.Stmt {…}

    parse_switch_stmt ¶

    parse_switch_stmt :: proc(p: ^Parser) -> ^odin_ast.Stmt {…}

    parse_type ¶

    parse_type :: proc(p: ^Parser) -> ^odin_ast.Expr {…}

    parse_type_or_ident ¶

    parse_type_or_ident :: proc(p: ^Parser) -> ^odin_ast.Expr {…}

    parse_unary_expr ¶

    parse_unary_expr :: proc(p: ^Parser, lhs: bool) -> ^odin_ast.Expr {…}

    parse_unrolled_for_loop ¶

    parse_unrolled_for_loop :: proc(p: ^Parser, inline_tok: odin_tokenizer.Token) -> ^odin_ast.Stmt {…}

    parse_value ¶

    parse_value :: proc(p: ^Parser) -> ^odin_ast.Expr {…}

    parse_value_decl ¶

    parse_value_decl :: proc(p: ^Parser, names: []^odin_ast.Expr, docs: ^odin_ast.Comment_Group) -> ^odin_ast.Decl {…}

    parse_var_type ¶

    parse_var_type :: proc(p: ^Parser, flags: odin_ast.Field_Flags) -> ^odin_ast.Expr {…}

    parse_when_stmt ¶

    parse_when_stmt :: proc(p: ^Parser) -> ^odin_ast.When_Stmt {…}

    peek_token ¶

    peek_token :: proc(p: ^Parser, lookahead: int = 0) -> (tok: odin_tokenizer.Token) {…}

    peek_token_kind ¶

    peek_token_kind :: proc(p: ^Parser, kind: odin_tokenizer.Token_Kind, lookahead: int = 0) -> (ok: bool) {…}

    skip_possible_newline ¶

    skip_possible_newline :: proc(p: ^Parser) -> bool {…}

    skip_possible_newline_for_literal ¶

    skip_possible_newline_for_literal :: proc(p: ^Parser) -> bool {…}

    string_to_calling_convention ¶

    string_to_calling_convention :: proc(s: string) -> odin_ast.Proc_Calling_Convention {…}

    token_precedence ¶

    token_precedence :: proc(p: ^Parser, kind: odin_tokenizer.Token_Kind) -> int {…}

    warn ¶

    warn :: proc(p: ^Parser, pos: odin_tokenizer.Pos, msg: string, .. args: ..any) {…}

    Procedure Groups

    Source Files

    Generation Information

    Generated with odin version dev-2024-12 (vendor "odin") Windows_amd64 @ 2024-12-17 21:11:01.202282200 +0000 UTC