diagnostics upgrade
This commit is contained in:
@@ -63,6 +63,14 @@ index :: proc(id: $T, invalid: T, count: int) -> (int, bool) {
|
||||
|
||||
Type_Syntax :: types.Type
|
||||
|
||||
Type_Use :: struct {
|
||||
type: Type_Syntax,
|
||||
span: source.Span,
|
||||
pkg: Package_Id,
|
||||
file: File_Id,
|
||||
diagnostic: source.Diagnostic_Id,
|
||||
}
|
||||
|
||||
Expr_Kind :: enum u8 {
|
||||
Invalid,
|
||||
Integer,
|
||||
@@ -325,6 +333,7 @@ Module :: struct {
|
||||
c_trampolines: [dynamic]Trampoline,
|
||||
strings: [dynamic]string,
|
||||
type_fields: [dynamic]types.Field,
|
||||
type_uses: [dynamic]Type_Use,
|
||||
type_store: types.Store,
|
||||
allocator: mem.Allocator,
|
||||
}
|
||||
@@ -345,6 +354,7 @@ init_module :: proc(allocator := context.allocator) -> Module {
|
||||
module.c_trampolines.allocator = allocator
|
||||
module.strings.allocator = allocator
|
||||
module.type_fields.allocator = allocator
|
||||
module.type_uses.allocator = allocator
|
||||
return module
|
||||
}
|
||||
|
||||
@@ -397,5 +407,6 @@ destroy_module :: proc(module: ^Module) {
|
||||
delete(module.c_trampolines)
|
||||
delete(module.strings)
|
||||
delete(module.type_fields)
|
||||
delete(module.type_uses)
|
||||
types.destroy_store(&module.type_store)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user