Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 28, 2024
1 parent 225e536 commit 19533d2
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions vlib/v/type_resolver/type_resolver.v
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -32,6 +33,7 @@ pub mut:
comptime_for_method_param_var string
}

// Interface for cgen / checker instance
pub interface IResolverType {
mut:
file &ast.File
Expand All @@ -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
Expand Down

0 comments on commit 19533d2

Please sign in to comment.