package core:odin/parser

Index

Constants (1)
Variables (0)

This section is empty.

Procedures (86)
Procedure Groups (1)

Types

Error_Handler ¶

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

Expr_And_Flags ¶

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

Flag ¶

Flag :: enum u32 {
	Optional_Semicolons, 
}

Flags ¶

Flags :: distinct bit_set[Flag; u32]

Import_Decl_Kind ¶

Import_Decl_Kind :: enum int {
	Standard, 
	Using, 
}

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,
}

Stmt_Allow_Flag ¶

Stmt_Allow_Flag :: enum int {
	In, 
	Label, 
}

Stmt_Allow_Flags ¶

Stmt_Allow_Flags :: distinct bit_set[Stmt_Allow_Flag]

Warning_Handler ¶

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

Constants

MAX_FIX_COUNT ¶

MAX_FIX_COUNT :: 10

Variables

This section is empty.

Procedures

advance_token ¶

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

allow_token ¶

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

check_field_flag_prefixes ¶

check_field_flag_prefixes :: proc "odin" (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 "odin" (p: ^Parser, names: []^odin_ast.Expr) -> bool {…}

collect_package ¶

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

consume_comment ¶

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

consume_comment_group ¶

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

consume_comment_groups ¶

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

convert_stmt_to_body ¶

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

convert_stmt_to_expr ¶

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

convert_to_ident_list ¶

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

default_error_handler ¶

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

default_parser ¶

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

default_warning_handler ¶

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

end_of_line_pos ¶

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

end_pos ¶

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

error ¶

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

expect_closing_brace_of_field_list ¶

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

expect_operator ¶

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

expect_semicolon ¶

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

expect_semicolon_newline_error ¶

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

expect_token ¶

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

expect_token_after ¶

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

fix_advance_to_next_stmt ¶

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

is_blank_ident_node ¶

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

is_blank_ident_string ¶

is_blank_ident_string :: proc "odin" (path: string) -> bool {…}

is_blank_ident_token ¶

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

is_literal_type ¶

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

is_non_inserted_semicolon ¶

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

is_package_name_reserved ¶

is_package_name_reserved :: proc "odin" (path: string) -> bool {…}

is_semicolon_optional_for_node ¶

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

is_token_field_prefix ¶

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

new_ast_field ¶

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

new_blank_ident ¶

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

next_token0 ¶

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

parse_atom_expr ¶

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

parse_attribute ¶

parse_attribute :: proc "odin" (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 "odin" (p: ^Parser, lhs: bool, prec_in: int) -> ^odin_ast.Expr {…}

parse_block_stmt ¶

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

parse_body ¶

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

parse_call_expr ¶

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

parse_case_clause ¶

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

parse_control_statement_semicolon_separator ¶

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

parse_elem_list ¶

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

parse_expr ¶

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

parse_expr_list ¶

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

parse_field_list ¶

parse_field_list :: proc "odin" (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 "odin" (p: ^Parser) -> (flags: odin_ast.Field_Flags) {…}

parse_file ¶

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

parse_for_stmt ¶

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

parse_foreign_block ¶

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

parse_foreign_block_decl ¶

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

parse_foreign_decl ¶

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

parse_ident ¶

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

parse_ident_list ¶

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

parse_if_stmt ¶

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

parse_import_decl ¶

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

parse_inlining_operand ¶

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

parse_lhs_expr_list ¶

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

parse_literal_value ¶

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

parse_operand ¶

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

parse_package ¶

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

parse_package_from_path ¶

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

parse_proc_tags ¶

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

parse_proc_type ¶

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

parse_results ¶

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

parse_rhs_expr_list ¶

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

parse_simple_stmt ¶

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

parse_stmt ¶

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

parse_stmt_list ¶

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

parse_switch_stmt ¶

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

parse_type ¶

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

parse_type_or_ident ¶

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

parse_unary_expr ¶

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

parse_unrolled_for_loop ¶

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

parse_value ¶

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

parse_value_decl ¶

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

parse_var_type ¶

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

parse_when_stmt ¶

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

peek_token ¶

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

peek_token_kind ¶

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

skip_possible_newline ¶

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

skip_possible_newline_for_literal ¶

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

string_to_calling_convention ¶

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

token_precedence ¶

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

warn ¶

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

Procedure Groups

Source Files

Generation Information

Generated with odin version dev-2022-12 (vendor "odin") Windows_amd64 @ 2022-12-06 21:08:55.207373400 +0000 UTC