From 19533d2cdc9c8f44d9c80095204c2c1697b27f14 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 28 Dec 2024 11:56:39 -0300 Subject: [PATCH] cleanup --- vlib/v/type_resolver/type_resolver.v | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/vlib/v/type_resolver/type_resolver.v b/vlib/v/type_resolver/type_resolver.v index 9393e11a5043f2..c07ac0ad81f5df 100644 --- a/vlib/v/type_resolver/type_resolver.v +++ b/vlib/v/type_resolver/type_resolver.v @@ -6,6 +6,7 @@ import ast import v.token import v.util +@[minify] pub struct ResolverInfo { pub mut: saved_type_map map[string]ast.Type @@ -32,6 +33,7 @@ pub mut: comptime_for_method_param_var string } +// Interface for cgen / checker instance pub interface IResolverType { mut: file &ast.File @@ -52,11 +54,12 @@ pub struct TypeResolver { pub mut: resolver IResolverType = DummyResolver{} table &ast.Table = unsafe { nil } - info ResolverInfo // infoent info - info_stack []ResolverInfo // stores the values from the above on each $for loop, to make nesting them easier - type_map map[string]ast.Type + info ResolverInfo // current info + info_stack []ResolverInfo // stores the values from the above on each $for loop, to make nesting them easier + type_map map[string]ast.Type // map for storing dynamic resolved types on checker/gen phase } +@[inline] pub fn TypeResolver.new(table &ast.Table, resolver &IResolverType) &TypeResolver { return &TypeResolver{ table: table