v.parser #

fn parse_comptime #

fn parse_comptime(text string, table &table.Table, pref &pref.Preferences, scope &ast.Scope, global_scope &ast.Scope) ast.File

fn parse_file #

fn parse_file(path string, table &table.Table, comments_mode scanner.CommentsMode, pref &pref.Preferences, global_scope &ast.Scope) ast.File

fn parse_files #

fn parse_files(paths []string, table &table.Table, pref &pref.Preferences, global_scope &ast.Scope) []ast.File

fn parse_stmt #

fn parse_stmt(text string, table &table.Table, scope &ast.Scope) ast.Stmt

for tests

fn parse_text #

fn parse_text(text string, path string, table &table.Table, comments_mode scanner.CommentsMode, pref &pref.Preferences, global_scope &ast.Scope) ast.File

fn parse_vet_file #

fn parse_vet_file(path string, table_ &table.Table, pref &pref.Preferences) (ast.File, []vet.Error)

struct Parser #

struct Parser {
	pref &pref.Preferences
mut:
	file_base         string
	file_name         string
	file_name_dir     string
	file_backend_mode table.Language
	scanner           &scanner.Scanner
	comments_mode     scanner.CommentsMode = .skip_comments
	tok               token.Token
	prev_tok          token.Token
	peek_tok          token.Token
	peek_tok2         token.Token
	peek_tok3         token.Token
	table             &table.Table
	language          table.Language
	inside_if         bool
	inside_if_expr    bool
	inside_ct_if_expr bool
	inside_or_expr    bool
	inside_for        bool
	inside_fn         bool
	inside_str_interp bool
	or_is_handled     bool
	builtin_mod       bool
	mod               string
	is_manualfree     bool
	attrs             []table.Attr
	expr_mod          string
	scope             &ast.Scope
	global_scope      &ast.Scope
	imports           map[string]string
	ast_imports       []ast.Import
	used_imports      []string
	auto_imports      []string
	imported_symbols  map[string]string
	is_amp            bool
	returns           bool
	inside_match      bool
	inside_select     bool
	inside_match_case bool
	inside_match_body bool
	inside_unsafe     bool
	is_stmt_ident     bool
	expecting_type    bool
	errors            []errors.Error
	warnings          []errors.Warning
	vet_errors        []vet.Error
	cur_fn_name       string
	in_generic_params bool
	name_error        bool
}

fn (Parser) call_args #

fn (mut p Parser) call_args() []ast.CallArg

fn (Parser) call_expr #

fn (mut p Parser) call_expr(language table.Language, mod string) ast.CallExpr

fn (Parser) check_comment #

fn (mut p Parser) check_comment() ast.Comment

TODO [if vfmt]

fn (Parser) check_for_impure_v #

fn (mut p Parser) check_for_impure_v(language table.Language, pos token.Position)

fn (Parser) close_scope #

fn (mut p Parser) close_scope()

fn (Parser) comment #

fn (mut p Parser) comment() ast.Comment

fn (Parser) comment_stmt #

fn (mut p Parser) comment_stmt() ast.ExprStmt

fn (Parser) eat_comments #

fn (mut p Parser) eat_comments() []ast.Comment

fn (Parser) eat_line_end_comments #

fn (mut p Parser) eat_line_end_comments() []ast.Comment

fn (Parser) error #

fn (mut p Parser) error(s string)

fn (Parser) error_with_pos #

fn (mut p Parser) error_with_pos(s string, pos token.Position)

fn (Parser) expr #

fn (mut p Parser) expr(precedence int) ast.Expr

fn (Parser) expr_with_left #

fn (mut p Parser) expr_with_left(left ast.Expr, precedence int, is_stmt_ident bool) ast.Expr

fn (Parser) init_parse_fns #

fn (mut p Parser) init_parse_fns()

fn (Parser) known_import #

fn (p &Parser) known_import(mod string) bool

return true if file being parsed imports mod

fn (Parser) mark_var_as_used #

fn (mut p Parser) mark_var_as_used(varname string) bool

fn (Parser) name_expr #

fn (mut p Parser) name_expr() ast.Expr

fn (Parser) open_scope #

fn (mut p Parser) open_scope()

fn (Parser) parse #

fn (mut p Parser) parse() ast.File

fn (Parser) parse_any_type #

fn (mut p Parser) parse_any_type(language table.Language, is_ptr bool, check_dot bool) table.Type

fn (Parser) parse_array_type #

fn (mut p Parser) parse_array_type() table.Type

fn (Parser) parse_block #

fn (mut p Parser) parse_block() []ast.Stmt

fn (Parser) parse_block_no_scope #

fn (mut p Parser) parse_block_no_scope(is_top_level bool) []ast.Stmt

fn (Parser) parse_chan_type #

fn (mut p Parser) parse_chan_type() table.Type

fn (Parser) parse_enum_or_struct_type #

fn (mut p Parser) parse_enum_or_struct_type(name string, language table.Language) table.Type

fn (Parser) parse_fn_type #

fn (mut p Parser) parse_fn_type(name string) table.Type

given anon name based off signature when name is blank

fn (Parser) parse_generic_struct_inst_type #

fn (mut p Parser) parse_generic_struct_inst_type(name string) table.Type

fn (Parser) parse_generic_template_type #

fn (mut p Parser) parse_generic_template_type(name string) table.Type

fn (Parser) parse_ident #

fn (mut p Parser) parse_ident(language table.Language) ast.Ident

fn (Parser) parse_language #

fn (mut p Parser) parse_language() table.Language

Parses any language indicators on a type.

fn (Parser) parse_map_type #

fn (mut p Parser) parse_map_type() table.Type

fn (Parser) parse_multi_return_type #

fn (mut p Parser) parse_multi_return_type() table.Type

fn (Parser) parse_type #

fn (mut p Parser) parse_type() table.Type

fn (Parser) parse_type_with_mut #

fn (mut p Parser) parse_type_with_mut(is_mut bool) table.Type

fn (Parser) read_first_token #

fn (mut p Parser) read_first_token()

fn (Parser) set_path #

fn (mut p Parser) set_path(path string)

fn (Parser) stmt #

fn (mut p Parser) stmt(is_top_level bool) ast.Stmt

fn (Parser) top_stmt #

fn (mut p Parser) top_stmt() ast.Stmt

fn (Parser) vet_error #

fn (mut p Parser) vet_error(msg string, line int, fix vet.FixKind)

fn (Parser) warn #

fn (mut p Parser) warn(s string)

fn (Parser) warn_with_pos #

fn (mut p Parser) warn_with_pos(s string, pos token.Position)