v.fmt #

fn fmt #

fn fmt(file ast.File, table &table.Table, is_debug bool) string

struct Fmt #

struct Fmt {
pub mut:
	table              &table.Table
	out_imports        strings.Builder
	out                strings.Builder
	out_save           strings.Builder
	indent             int
	empty_line         bool
	line_len           int
	buffering          bool
	expr_bufs          []string
	penalties          []int
	precedences        []int
	par_level          int
	array_init_break   []bool
	array_init_depth   int
	single_line_if     bool
	cur_mod            string
	file               ast.File
	did_imports        bool
	is_assign          bool
	auto_imports       []string
	import_pos         int
	used_imports       []string
	is_debug           bool
	mod2alias          map[string]string
	use_short_fn_args  bool
	single_line_fields bool
	it_name            string
	inside_lambda      bool
	is_mbranch_expr    bool
}

fn (Fmt) array_decompose #

fn (mut f Fmt) array_decompose(node ast.ArrayDecompose)

fn (Fmt) array_init #

fn (mut f Fmt) array_init(it ast.ArrayInit)

fn (Fmt) as_cast #

fn (mut f Fmt) as_cast(node ast.AsCast)

fn (Fmt) assert_stmt #

fn (mut f Fmt) assert_stmt(node ast.AssertStmt)

fn (Fmt) assign_stmt #

fn (mut f Fmt) assign_stmt(node ast.AssignStmt)

fn (Fmt) assoc #

fn (mut f Fmt) assoc(node ast.Assoc)

fn (Fmt) at_expr #

fn (mut f Fmt) at_expr(node ast.AtExpr)

fn (Fmt) block #

fn (mut f Fmt) block(node ast.Block)

fn (Fmt) call_args #

fn (mut f Fmt) call_args(args []ast.CallArg)

fn (Fmt) call_expr #

fn (mut f Fmt) call_expr(node ast.CallExpr)

fn (Fmt) cast_expr #

fn (mut f Fmt) cast_expr(node ast.CastExpr)

fn (Fmt) chan_init #

fn (mut f Fmt) chan_init(mut it ast.ChanInit)

fn (Fmt) comment #

fn (mut f Fmt) comment(node ast.Comment, options CommentsOptions)

fn (Fmt) comments #

fn (mut f Fmt) comments(comments []ast.Comment, options CommentsOptions)

fn (Fmt) comments_after_last_field #

fn (mut f Fmt) comments_after_last_field(comments []ast.Comment)

fn (Fmt) comp_for #

fn (mut f Fmt) comp_for(node ast.CompFor)

fn (Fmt) comptime_call #

fn (mut f Fmt) comptime_call(node ast.ComptimeCall)

fn (Fmt) comptime_selector #

fn (mut f Fmt) comptime_selector(node ast.ComptimeSelector)

fn (Fmt) concat_expr #

fn (mut f Fmt) concat_expr(node ast.ConcatExpr)

fn (Fmt) const_decl #

fn (mut f Fmt) const_decl(it ast.ConstDecl)

fn (Fmt) defer_stmt #

fn (mut f Fmt) defer_stmt(node ast.DeferStmt)

fn (Fmt) enum_decl #

fn (mut f Fmt) enum_decl(node ast.EnumDecl)

fn (Fmt) enum_val #

fn (mut f Fmt) enum_val(node ast.EnumVal)

fn (Fmt) expr #

fn (mut f Fmt) expr(node ast.Expr)

fn (Fmt) expr_stmt #

fn (mut f Fmt) expr_stmt(node ast.ExprStmt)

fn (Fmt) fn_decl #

fn (mut f Fmt) fn_decl(node ast.FnDecl)

fn (Fmt) for_c_stmt #

fn (mut f Fmt) for_c_stmt(node ast.ForCStmt)

fn (Fmt) for_in_stmt #

fn (mut f Fmt) for_in_stmt(node ast.ForInStmt)

fn (Fmt) for_stmt #

fn (mut f Fmt) for_stmt(node ast.ForStmt)

fn (Fmt) go_stmt #

fn (mut f Fmt) go_stmt(node ast.GoStmt, is_expr bool)

fn (Fmt) ident #

fn (mut f Fmt) ident(node ast.Ident)

fn (Fmt) if_expr #

fn (mut f Fmt) if_expr(it ast.IfExpr)

fn (Fmt) if_guard_expr #

fn (mut f Fmt) if_guard_expr(node ast.IfGuardExpr)

fn (Fmt) imp_stmt_str #

fn (f Fmt) imp_stmt_str(imp ast.Import) string

fn (Fmt) imports #

fn (mut f Fmt) imports(imports []ast.Import)

fn (Fmt) index_expr #

fn (mut f Fmt) index_expr(node ast.IndexExpr)

fn (Fmt) infix_expr #

fn (mut f Fmt) infix_expr(node ast.InfixExpr)

fn (Fmt) interface_decl #

fn (mut f Fmt) interface_decl(node ast.InterfaceDecl)

fn (Fmt) likely #

fn (mut f Fmt) likely(node ast.Likely)

fn (Fmt) lock_expr #

fn (mut f Fmt) lock_expr(lex ast.LockExpr)

fn (Fmt) map_init #

fn (mut f Fmt) map_init(it ast.MapInit)

fn (Fmt) mark_import_as_used #

fn (mut f Fmt) mark_import_as_used(name string)

name is a function (foo.bar()) or type (foo.Bar{})

fn (Fmt) mark_types_import_as_used #

fn (mut f Fmt) mark_types_import_as_used(typ table.Type)

fn (Fmt) match_expr #

fn (mut f Fmt) match_expr(it ast.MatchExpr)

fn (Fmt) mod #

fn (mut f Fmt) mod(mod ast.Module)

fn (Fmt) no_cur_mod #

fn (mut f Fmt) no_cur_mod(typename string) string

fn (Fmt) or_expr #

fn (mut f Fmt) or_expr(or_block ast.OrExpr)

fn (Fmt) par_expr #

fn (mut f Fmt) par_expr(node ast.ParExpr)

fn (Fmt) postfix_expr #

fn (mut f Fmt) postfix_expr(node ast.PostfixExpr)

fn (Fmt) prefix_expr #

fn (mut f Fmt) prefix_expr(node ast.PrefixExpr)

fn (Fmt) prefix_expr_cast_expr #

fn (mut f Fmt) prefix_expr_cast_expr(fexpr ast.Expr)

fn (Fmt) process_file_imports #

fn (mut f Fmt) process_file_imports(file &ast.File)

fn (Fmt) range_expr #

fn (mut f Fmt) range_expr(node ast.RangeExpr)

fn (Fmt) remove_new_line #

fn (mut f Fmt) remove_new_line()

fn (Fmt) return_stmt #

fn (mut f Fmt) return_stmt(node ast.Return)

fn (Fmt) select_expr #

fn (mut f Fmt) select_expr(node ast.SelectExpr)

fn (Fmt) selector_expr #

fn (mut f Fmt) selector_expr(node ast.SelectorExpr)

fn (Fmt) set_current_module_name #

fn (mut f Fmt) set_current_module_name(cmodname string)

fn (Fmt) short_module #

fn (mut f Fmt) short_module(name string) string

foo.bar.fn() => bar.fn()

fn (Fmt) size_of #

fn (mut f Fmt) size_of(node ast.SizeOf)

fn (Fmt) sql_expr #

fn (mut f Fmt) sql_expr(node ast.SqlExpr)

fn (Fmt) sql_stmt #

fn (mut f Fmt) sql_stmt(node ast.SqlStmt)

fn (Fmt) stmt #

fn (mut f Fmt) stmt(node ast.Stmt)

fn (Fmt) stmt_str #

fn (mut f Fmt) stmt_str(node ast.Stmt) string

fn (Fmt) stmts #

fn (mut f Fmt) stmts(stmts []ast.Stmt)

fn (Fmt) string_inter_literal #

fn (mut f Fmt) string_inter_literal(node ast.StringInterLiteral)

fn (Fmt) string_literal #

fn (mut f Fmt) string_literal(node ast.StringLiteral)

fn (Fmt) struct_decl #

fn (mut f Fmt) struct_decl(node ast.StructDecl)

fn (Fmt) struct_init #

fn (mut f Fmt) struct_init(it ast.StructInit)

fn (Fmt) type_decl #

fn (mut f Fmt) type_decl(node ast.TypeDecl)

fn (Fmt) type_of #

fn (mut f Fmt) type_of(node ast.TypeOf)

fn (Fmt) unsafe_expr #

fn (mut f Fmt) unsafe_expr(node ast.UnsafeExpr)

fn (Fmt) wrap_long_line #

fn (mut f Fmt) wrap_long_line(penalty_idx int, add_indent bool) bool

fn (Fmt) write #

fn (mut f Fmt) write(s string)

fn (Fmt) writeln #

fn (mut f Fmt) writeln(s string)