Module v.parser stdlib

Dependencies from vmod:
Imported by:
Show selected OS-specific symbols.
Show selected Backend-specific symbols.

Dependencies defined in v.mod

This section is empty.

Imported by


This section is empty.


This section is empty.

Sum types

This section is empty.


#fn parse_comptime

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

#fn parse_file

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

#fn parse_files

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

#fn parse_stmt

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

for tests

#fn parse_text

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

#fn parse_vet_file

fn parse_vet_file(path string, table_ &v.ast.Table, pref_ &v.pref.Preferences) (&v.ast.File, []


#struct Parser

pub struct Parser {
	pref &pref.Preferences = unsafe { nil }
	file_base         string       // "hello.v"
	file_name         string       // "/home/user/hello.v"
	file_name_dir     string       // "/home/user"
	file_display_path string       // just "hello.v", when your current folder for the compilation is "/home/user/", otherwise the full path "/home/user/hello.v"
	unique_prefix     string       // a hash of p.file_name, used for making anon fn generation unique
	file_backend_mode ast.Language // .c for .c.v|.c.vv|.c.vsh files; .js for .js.v files, .amd64/.rv32/other arches for .amd64.v/.rv32.v/etc. files, .v otherwise.
	comments_mode     scanner.CommentsMode = .skip_comments
	// see comment in parse_file
	tok                       token.Token
	prev_tok                  token.Token
	peek_tok                  token.Token
	table                     &ast.Table = unsafe { nil }
	language                  ast.Language
	fn_language               ast.Language // .c for `fn C.abcd()` declarations
	expr_level                int  // prevent too deep recursions for pathological programs
	inside_vlib_file          bool // true for all vlib/ files
	inside_test_file          bool // when inside _test.v or _test.vv file
	inside_if                 bool
	inside_comptime_if        bool
	inside_if_expr            bool
	inside_if_cond            bool
	inside_ct_if_expr         bool
	inside_or_expr            bool
	inside_for                bool
	inside_fn                 bool // true even with implicit main
	inside_fn_return          bool
	inside_unsafe_fn          bool
	inside_str_interp         bool
	inside_array_lit          bool
	inside_in_array           bool
	inside_infix              bool
	inside_match              bool // to separate `match A { }` from `Struct{}`
	inside_select             bool // to allow `ch <- Struct{} {` inside `select`
	inside_match_case         bool // to separate `match_expr { }` from `Struct{}`
	inside_match_body         bool // to fix eval not used TODO
	inside_unsafe             bool
	inside_sum_type           bool // to prevent parsing inline sum type again
	inside_asm_template       bool
	inside_asm                bool
	inside_defer              bool
	inside_generic_params     bool // indicates if parsing between `<` and `>` of a method/function
	inside_receiver_param     bool // indicates if parsing the receiver parameter inside the first `(` and `)` of a method
	inside_struct_field_decl  bool
	inside_struct_attr_decl   bool
	inside_map_init           bool
	inside_orm                bool
	or_is_handled             bool       // ignore `or` in this expression
	builtin_mod               bool       // are we in the `builtin` module?
	mod                       string     // current module name
	is_manualfree             bool       // true when `[manualfree] module abc`, makes *all* fns in the current .v file, opt out of autofree
	has_globals               bool       // `[has_globals] module abc` - allow globals declarations, even without -enable-globals, in that single .v file __only__
	is_generated              bool       // `[generated] module abc` - turn off compiler notices for that single .v file __only__.
	is_translated             bool       // `[translated] module abc` - mark a file as translated, to relax some compiler checks for translated code.
	attrs                     []ast.Attr // attributes before next decl stmt
	expr_mod                  string     // for constructing full type names in parse_type()
	scope                     &ast.Scope = unsafe { nil }
	imports                   map[string]string // alias => mod_name
	ast_imports               []ast.Import      // mod_names
	used_imports              []string // alias
	auto_imports              []string // imports, the user does not need to specify
	imported_symbols          map[string]string
	is_amp                    bool // for generating the right code for `&Foo{}`
	returns                   bool
	is_stmt_ident             bool // true while the beginning of a statement is an ident/selector
	expecting_type            bool // `is Type`, expecting type
	cur_fn_name               string
	label_names               []string
	name_error                bool // indicates if the token is not a name or the name is on another line
	n_asm                     int  // controls assembly labels
	global_labels             []string
	comptime_if_cond          bool
	defer_vars                []ast.Ident
	should_abort              bool // when too many errors/warnings/notices are accumulated, should_abort becomes true, and the parser should stop
	codegen_text              string
	anon_struct_decl          ast.StructDecl
	struct_init_generic_types []ast.Type
	if_cond_comments          []ast.Comment
	left_comments             []ast.Comment
	script_mode               bool
	script_mode_start_token   token.Token
pub mut:
	scanner        &scanner.Scanner = unsafe { nil }
	errors         []errors.Error
	warnings       []errors.Warning
	notices        []errors.Notice
	vet_errors     []vet.Error
	template_paths []string // record all compiled $tmpl files; needed for `v watch run webserver.v`

#fn (&Parser) assign_stmt

fn (mut p &Parser) assign_stmt() v.ast.Stmt

#fn (&Parser) check_undefined_variables

fn (mut p &Parser) check_undefined_variables(names []string, val v.ast.Expr) !

#fn (&Parser) check_cross_variables

fn (mut p &Parser) check_cross_variables(exprs []v.ast.Expr, val v.ast.Expr) bool

#fn (&Parser) partial_assign_stmt

fn (mut p &Parser) partial_assign_stmt(left []v.ast.Expr, left_comments []v.ast.Comment) v.ast.Stmt

#fn (&Parser) parse_comptime_type

fn (mut p &Parser) parse_comptime_type() v.ast.ComptimeType

#fn (&Parser) hash

fn (mut p &Parser) hash() v.ast.HashStmt

// #include, #flag, #v

#fn (&Parser) comptime_call

fn (mut p &Parser) comptime_call() v.ast.ComptimeCall

#fn (&Parser) comptime_for

fn (mut p &Parser) comptime_for() v.ast.ComptimeFor

#fn (&Parser) at

fn (mut p &Parser) at() v.ast.AtExpr

@FN, @STRUCT, @MOD etc. See full list in token.valid_at_tokens

#fn (&Parser) comptime_selector

fn (mut p &Parser) comptime_selector(left v.ast.Expr) v.ast.Expr

#fn (&Parser) array_init

fn (mut p &Parser) array_init(is_option bool) v.ast.ArrayInit

#fn (&Parser) map_init

fn (mut p &Parser) map_init() v.ast.MapInit

parse tokens between braces

#fn (&Parser) scope_register_index

fn (mut p &Parser) scope_register_index()

#fn (&Parser) handle_index_variable

fn (mut p &Parser) handle_index_variable(mut default_expr &v.ast.Expr) bool

#fn (&Parser) expr

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

#fn (&Parser) check_expr

fn (mut p &Parser) check_expr(precedence int) !v.ast.Expr

#fn (&Parser) expr_with_left

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

#fn (&Parser) infix_expr

fn (mut p &Parser) infix_expr(left v.ast.Expr) v.ast.Expr

#fn (&Parser) fileis

fn (p &Parser) fileis(s string) bool

#fn (&Parser) prefix_expr

fn (mut p &Parser) prefix_expr() v.ast.Expr

#fn (&Parser) recast_as_pointer

fn (mut p &Parser) recast_as_pointer(mut cast_expr &v.ast.CastExpr, pos v.token.Pos)

#fn (&Parser) prefix_inc_dec_error

fn (mut p &Parser) prefix_inc_dec_error()

prefix_inc_dec_error reports an error for a prefix increment or decrement.

prefix increments and decrements are not allowed in V.

#fn (&Parser) process_custom_orm_operators

fn (mut p &Parser) process_custom_orm_operators()

process_custom_orm_operators checks whether a word in infix expressions is an ORM operator.

If it is, then a new kind is assigned to it, so that the parser will process it as a keyword.

This is necessary to ensure that parts of the ORM expression do not function outside of the ORM and are not recognized as keywords in the language.

For example, there is a like operator in ORM, which should be used in expressions like name like 'M%', but it should not be used in V directly.

#fn (&Parser) call_expr

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

#fn (&Parser) call_args

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

#fn (&Parser) fn_decl

fn (mut p &Parser) fn_decl() v.ast.FnDecl

#fn (&Parser) fn_receiver

fn (mut p &Parser) fn_receiver(mut params &[]v.ast.Param, mut rec &ReceiverParsingInfo) !

#fn (&Parser) anon_fn

fn (mut p &Parser) anon_fn() v.ast.AnonFn

#fn (&Parser) fn_args

fn (mut p &Parser) fn_args() ([]v.ast.Param, bool, bool)

part of fn declaration

#fn (&Parser) go_expr

fn (mut p &Parser) go_expr() v.ast.GoExpr

#fn (&Parser) closure_vars

fn (mut p &Parser) closure_vars() []v.ast.Param

#fn (&Parser) check_fn_mutable_arguments

fn (mut p &Parser) check_fn_mutable_arguments(typ v.ast.Type, pos v.token.Pos)

#fn (&Parser) check_fn_shared_arguments

fn (mut p &Parser) check_fn_shared_arguments(typ v.ast.Type, pos v.token.Pos)

#fn (&Parser) check_fn_atomic_arguments

fn (mut p &Parser) check_fn_atomic_arguments(typ v.ast.Type, pos v.token.Pos)

#fn (&Parser) for_stmt

fn (mut p &Parser) for_stmt() v.ast.Stmt

#fn (&Parser) if_expr

fn (mut p &Parser) if_expr(is_comptime bool) v.ast.IfExpr

#fn (&Parser) is_only_array_type

fn (mut p &Parser) is_only_array_type() bool

#fn (&Parser) match_expr

fn (mut p &Parser) match_expr() v.ast.MatchExpr

#fn (&Parser) select_expr

fn (mut p &Parser) select_expr() v.ast.SelectExpr

#fn (&Parser) lockable

fn (mut p &Parser) lockable() v.ast.Expr

parse x or x.y.z - no index, no struct literals ({ starts lock block)

#fn (&Parser) lockable_list

fn (mut p &Parser) lockable_list() ([]v.ast.Expr, []v.ast.Comment)

like expr_list but only lockables are allowed, { starts lock block (not struct literal)

#fn (&Parser) lock_expr

fn (mut p &Parser) lock_expr() v.ast.LockExpr

#fn (&Parser) known_import

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

return true if file being parsed imports mod

#fn (&Parser) prepend_mod

fn (p &Parser) prepend_mod(name string) string

#fn (&Parser) is_used_import

fn (p &Parser) is_used_import(alias string) bool

#fn (&Parser) register_used_import

fn (mut p &Parser) register_used_import(alias string)

#fn (&Parser) register_auto_import

fn (mut p &Parser) register_auto_import(alias string)

#fn (&Parser) check_unused_imports

fn (mut p &Parser) check_unused_imports()

#fn (&Parser) sql_expr

fn (mut p &Parser) sql_expr() v.ast.Expr

#fn (&Parser) sql_stmt

fn (mut p &Parser) sql_stmt() v.ast.SqlStmt

insert user into User update User set nr_oders=nr_orders+1 where id == user_id

#fn (&Parser) parse_sql_or_block

fn (mut p &Parser) parse_sql_or_block() v.ast.OrExpr

#fn (&Parser) parse_sql_stmt_line

fn (mut p &Parser) parse_sql_stmt_line() v.ast.SqlStmtLine

#fn (&Parser) check_sql_keyword

fn (mut p &Parser) check_sql_keyword(name string) ?bool

#fn (&Parser) check_sql_where_expr_has_no_undefined_variables

fn (mut p &Parser) check_sql_where_expr_has_no_undefined_variables(expr &v.ast.Expr, unacceptable_variable_names []string) v.ast.Expr

check_sql_where_expr_has_no_undefined_variables recursively tries to find undefined variables in the right part of infix expressions.

#fn (&Parser) parse_array_type

fn (mut p &Parser) parse_array_type(expecting v.token.Kind) v.ast.Type

#fn (&Parser) parse_map_type

fn (mut p &Parser) parse_map_type() v.ast.Type

#fn (&Parser) parse_chan_type

fn (mut p &Parser) parse_chan_type() v.ast.Type

#fn (&Parser) parse_thread_type

fn (mut p &Parser) parse_thread_type() v.ast.Type

#fn (&Parser) parse_multi_return_type

fn (mut p &Parser) parse_multi_return_type() v.ast.Type

#fn (&Parser) parse_fn_type

fn (mut p &Parser) parse_fn_type(name string, generic_types []v.ast.Type) v.ast.Type

given anon name based off signature when name is blank

#fn (&Parser) parse_type_with_mut

fn (mut p &Parser) parse_type_with_mut(is_mut bool) v.ast.Type

#fn (&Parser) parse_language

fn (mut p &Parser) parse_language() v.ast.Language

Parses any language indicators on a type.

#fn (&Parser) parse_inline_sum_type

fn (mut p &Parser) parse_inline_sum_type() v.ast.Type

parse_inline_sum_type parses the type and registers it in case the type is an anonymous sum type.

It also takes care of inline sum types where parse_type only parses a standalone type.

#fn (&Parser) parse_sum_type_variants

fn (mut p &Parser) parse_sum_type_variants() []v.ast.TypeNode

parse_sum_type_variants parses several types separated with a pipe and returns them as a list with at least one node.

If there is less than one node, it will add an error to the error list.

#fn (&Parser) parse_type

fn (mut p &Parser) parse_type() v.ast.Type

#fn (&Parser) parse_any_type

fn (mut p &Parser) parse_any_type(language v.ast.Language, is_ptr bool, check_dot bool) v.ast.Type

#fn (&Parser) find_type_or_add_placeholder

fn (mut p &Parser) find_type_or_add_placeholder(name string, language v.ast.Language) v.ast.Type

#fn (&Parser) parse_generic_type

fn (mut p &Parser) parse_generic_type(name string) v.ast.Type

#fn (&Parser) parse_generic_inst_type

fn (mut p &Parser) parse_generic_inst_type(name string) v.ast.Type

#fn (&Parser) free

fn (mut p &Parser) free()

#fn (&Parser) free_scanner

fn (mut p &Parser) free_scanner()

#fn (&Parser) set_path

fn (mut p &Parser) set_path(path string)

#fn (&Parser) parse

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

#fn (&Parser) codegen

fn (mut p &Parser) codegen(code string)

codegen allows you to generate V code, so that it can be parsed, checked, markused, cgen-ed etc further, just like user's V code.

#fn (&Parser) init_parse_fns

fn (mut p &Parser) init_parse_fns()

#fn (&Parser) read_first_token

fn (mut p &Parser) read_first_token()

#fn (&Parser) peek_token

fn (p &Parser) peek_token(n int) v.token.Token

#fn (&Parser) peek_token_after_var_list

fn (p &Parser) peek_token_after_var_list() v.token.Token

peek token in if guard if x,y := opt() after var_list x,y

#fn (&Parser) is_fn_type_decl

fn (p &Parser) is_fn_type_decl() bool

peek token type Fn = fn () int

#fn (&Parser) is_array_type

fn (p &Parser) is_array_type() bool

#fn (&Parser) open_scope

fn (mut p &Parser) open_scope()

#fn (&Parser) close_scope

fn (mut p &Parser) close_scope()

#fn (&Parser) parse_block

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

#fn (&Parser) parse_block_no_scope

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

#fn (&Parser) next

fn (mut p &Parser) next()

#fn (&Parser) check

fn (mut p &Parser) check(expected v.token.Kind)

#fn (&Parser) unexpected

fn (mut p &Parser) unexpected(params ParamsForUnexpected) v.ast.NodeError

#fn (&Parser) unexpected_with_pos

fn (mut p &Parser) unexpected_with_pos(pos v.token.Pos, params ParamsForUnexpected) v.ast.NodeError

#fn (&Parser) check_js_name

fn (mut p &Parser) check_js_name() string

JS functions can have multiple dots in their name:

#fn (&Parser) check_name

fn (mut p &Parser) check_name() string

#fn (&Parser) trace_parser

trace_parser ?
fn (p &Parser) trace_parser(label string)

#fn (&Parser) top_stmt

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

#fn (&Parser) other_stmts

fn (mut p &Parser) other_stmts(cur_stmt v.ast.Stmt) v.ast.Stmt

#fn (&Parser) check_comment

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

TODO [if vfmt]

#fn (&Parser) comment

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

#fn (&Parser) comment_stmt

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

#fn (&Parser) eat_comments

fn (mut p &Parser) eat_comments(cfg EatCommentsConfig) []v.ast.Comment

#fn (&Parser) stmt

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

#fn (&Parser) asm_stmt

fn (mut p &Parser) asm_stmt(is_top_level bool) v.ast.AsmStmt

#fn (&Parser) reg_or_alias

fn (mut p &Parser) reg_or_alias() v.ast.AsmArg

#fn (&Parser) asm_addressing

fn (mut p &Parser) asm_addressing() v.ast.AsmAddressing

#fn (&Parser) asm_ios

fn (mut p &Parser) asm_ios(output bool) []v.ast.AsmIO

#fn (&Parser) expr_list

fn (mut p &Parser) expr_list() ([]v.ast.Expr, []v.ast.Comment)

#fn (&Parser) is_attributes

fn (mut p &Parser) is_attributes() bool

#fn (&Parser) attributes

fn (mut p &Parser) attributes()

when is_top_stmt is true attrs are added to p.attrs

#fn (&Parser) parse_attr

fn (mut p &Parser) parse_attr() v.ast.Attr

#fn (&Parser) language_not_allowed_error

fn (mut p &Parser) language_not_allowed_error(language v.ast.Language, pos v.token.Pos)

#fn (&Parser) language_not_allowed_warning

fn (mut p &Parser) language_not_allowed_warning(language v.ast.Language, pos v.token.Pos)

#fn (&Parser) check_for_impure_v

fn (mut p &Parser) check_for_impure_v(language v.ast.Language, pos v.token.Pos)

#fn (&Parser) error

fn (mut p &Parser) error(s string) v.ast.NodeError

#fn (&Parser) warn

fn (mut p &Parser) warn(s string)

#fn (&Parser) note

fn (mut p &Parser) note(s string)

#fn (&Parser) error_with_pos

fn (mut p &Parser) error_with_pos(s string, pos v.token.Pos) v.ast.NodeError

#fn (&Parser) error_with_error

fn (mut p &Parser) error_with_error(error v.errors.Error)

#fn (&Parser) warn_with_pos

fn (mut p &Parser) warn_with_pos(s string, pos v.token.Pos)

#fn (&Parser) note_with_pos

fn (mut p &Parser) note_with_pos(s string, pos v.token.Pos)

#fn (&Parser) vet_error

fn (mut p &Parser) vet_error(msg string, line int, fix, typ

#fn (&Parser) parse_multi_expr

fn (mut p &Parser) parse_multi_expr(is_top_level bool) v.ast.Stmt

#fn (&Parser) parse_ident

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

#fn (&Parser) is_generic_struct_init

fn (p &Parser) is_generic_struct_init() bool

#fn (&Parser) is_typename

fn (p &Parser) is_typename(t v.token.Token) bool

#fn (&Parser) is_generic_call

fn (p &Parser) is_generic_call() bool

heuristics to detect func<T>() from var < expr 1. f<[] is generic(e.g. f<[]int>) because var < [] is invalid 2. f<map[ is generic(e.g. f<map[string]string>) 3. fis generic becausev1 < foo > v2is invalid syntax 4.f<foo<baris generic when bar is not generic T (f<foo<T>(), in contrast, is not generic!) 5.f<Foo,` is generic when Foo is typename.

   otherwise it is not generic because it may be multi-value (e.g. `return f < foo, 0`).
  1. f<mod.Foo> is same as case 3 7. f<mod.Foo, is same as case 5 8. if there is a &, ignore the & and see if it is a type 9. otherwise, it's not generic see also test_generic_detection in vlib/v/tests/generics_test.v

#fn (&Parser) is_generic_cast

fn (mut p &Parser) is_generic_cast() bool

#fn (&Parser) name_expr

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

#fn (&Parser) or_block

fn (mut p &Parser) or_block(err_var_mode OrBlockErrVarMode) ([]v.ast.Stmt, v.token.Pos)

#fn (&Parser) index_expr

fn (mut p &Parser) index_expr(left v.ast.Expr, is_gated bool) v.ast.IndexExpr

#fn (&Parser) scope_register_it

fn (mut p &Parser) scope_register_it()

#fn (&Parser) scope_register_ab

fn (mut p &Parser) scope_register_ab()

#fn (&Parser) dot_expr

fn (mut p &Parser) dot_expr(left v.ast.Expr) v.ast.Expr

#fn (&Parser) parse_generic_types

fn (mut p &Parser) parse_generic_types() ([]v.ast.Type, []string)

#fn (&Parser) parse_concrete_types

fn (mut p &Parser) parse_concrete_types() []v.ast.Type

#fn (&Parser) is_generic_name

fn (p &Parser) is_generic_name() bool

is_generic_name returns true if the current token is a generic name.

#fn (&Parser) enum_val

fn (mut p &Parser) enum_val() v.ast.EnumVal

.green pref.BuildMode.default_mode

#fn (&Parser) filter_string_vet_errors

fn (mut p &Parser) filter_string_vet_errors(pos v.token.Pos)

#fn (&Parser) string_expr

fn (mut p &Parser) string_expr() v.ast.Expr

#fn (&Parser) parse_number_literal

fn (mut p &Parser) parse_number_literal() v.ast.Expr

#fn (&Parser) module_decl

fn (mut p &Parser) module_decl() v.ast.Module

#fn (&Parser) import_stmt

fn (mut p &Parser) import_stmt() v.ast.Import

#fn (&Parser) import_syms

fn (mut p &Parser) import_syms(mut parent &v.ast.Import)

import_syms parses the inner part of import module { submod1, submod2 }

#fn (&Parser) const_decl

fn (mut p &Parser) const_decl() v.ast.ConstDecl

#fn (&Parser) return_stmt

fn (mut p &Parser) return_stmt() v.ast.Return

#fn (&Parser) global_decl

fn (mut p &Parser) global_decl() v.ast.GlobalDecl

left hand side of = or := in a,b,c := 1,2,3

#fn (&Parser) enum_decl

fn (mut p &Parser) enum_decl() v.ast.EnumDecl

#fn (&Parser) type_decl

fn (mut p &Parser) type_decl() v.ast.TypeDecl

#fn (&Parser) assoc

fn (mut p &Parser) assoc() v.ast.Assoc

#fn (&Parser) new_true_expr

fn (p &Parser) new_true_expr() v.ast.Expr

#fn (&Parser) top_level_statement_start

fn (mut p &Parser) top_level_statement_start()

#fn (&Parser) top_level_statement_end

fn (mut p &Parser) top_level_statement_end()

#fn (&Parser) rewind_scanner_to_current_token_in_new_mode

fn (mut p &Parser) rewind_scanner_to_current_token_in_new_mode()

#fn (&Parser) mark_var_as_used

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

returns true if varname is known

#fn (&Parser) unsafe_stmt

fn (mut p &Parser) unsafe_stmt() v.ast.Stmt

#fn (&Parser) disallow_declarations_in_script_mode

fn (mut p &Parser) disallow_declarations_in_script_mode() bool

#fn (&Parser) trace

fn (mut p &Parser) trace(fbase string, message string)

#fn (&Parser) show

fn (mut p &Parser) show(params ParserShowParams)

#fn (&Parser) struct_decl

fn (mut p &Parser) struct_decl(is_anon bool) v.ast.StructDecl

#fn (&Parser) struct_init

fn (mut p &Parser) struct_init(typ_str string, kind v.ast.StructInitKind, is_option bool) v.ast.StructInit

#fn (&Parser) interface_decl

fn (mut p &Parser) interface_decl() v.ast.InterfaceDecl

#fn (&Parser) compile_template_file

fn (mut p &Parser) compile_template_file(template_file string, fn_name string) string

compile_file compiles the content of a file by the given path as a template


This section is empty.


This section is empty.