v.generics #
fn new_generics #
fn new_generics(pref_ &pref.Preferences) &Generics
fn new_generics_with_table #
fn new_generics_with_table(table &ast.Table, pref_ &pref.Preferences) &Generics
struct Generics #
struct Generics {
pref &pref.Preferences
pub mut:
table &ast.Table = unsafe { nil }
file &ast.File = unsafe { nil }
styp_cache map[ast.Type]string
cur_fn &ast.FnDecl = unsafe { nil }
cur_concrete_types []ast.Type
inside_struct_init bool
cur_struct_init_typ ast.Type
}
Stage for solving generics
fn (Generics) solve_files #
fn (mut g Generics) solve_files(ast_files []&ast.File)
fn (Generics) solve #
fn (mut g Generics) solve(mut ast_file ast.File)
fn (Generics) stmts #
fn (mut g Generics) stmts(mut nodes []ast.Stmt) []ast.Stmt
fn (Generics) stmt #
fn (mut g Generics) stmt(mut node ast.Stmt) ast.Stmt
fn (Generics) styp #
fn (mut g Generics) styp(_t ast.Type) string
incomplete implementation: TODO
fn (Generics) concrete_name #
fn (mut g Generics) concrete_name(old_name string, concrete_types []ast.Type) string
fn (Generics) generic_fn_decl #
fn (mut g Generics) generic_fn_decl(mut node ast.FnDecl) []ast.Stmt
fn (Generics) exprs #
fn (mut g Generics) exprs(mut nodes []ast.Expr) []ast.Expr
fn (Generics) expr #
fn (mut g Generics) expr(mut node ast.Expr) ast.Expr