mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
make all necessary structs public
This commit is contained in:
@@ -234,8 +234,8 @@ fn new_table(obfuscate bool) &Table {
|
||||
mut t := &Table {
|
||||
obfuscate: obfuscate
|
||||
}
|
||||
t.register_type('int')
|
||||
t.register_type('size_t')
|
||||
t.register_builtin('int')
|
||||
t.register_builtin('size_t')
|
||||
t.register_type_with_parent('i8', 'int')
|
||||
t.register_type_with_parent('byte', 'int')
|
||||
t.register_type_with_parent('char', 'int') // for C functions only, to avoid warnings
|
||||
@@ -244,17 +244,17 @@ fn new_table(obfuscate bool) &Table {
|
||||
t.register_type_with_parent('u32', 'int')
|
||||
t.register_type_with_parent('i64', 'int')
|
||||
t.register_type_with_parent('u64', 'u32')
|
||||
t.register_type('byteptr')
|
||||
t.register_type('intptr')
|
||||
t.register_type('f32')
|
||||
t.register_type('f64')
|
||||
t.register_type('rune')
|
||||
t.register_type('bool')
|
||||
t.register_type('void')
|
||||
t.register_type('voidptr')
|
||||
t.register_type('va_list')
|
||||
t.register_builtin('byteptr')
|
||||
t.register_builtin('intptr')
|
||||
t.register_builtin('f32')
|
||||
t.register_builtin('f64')
|
||||
t.register_builtin('rune')
|
||||
t.register_builtin('bool')
|
||||
t.register_builtin('void')
|
||||
t.register_builtin('voidptr')
|
||||
t.register_builtin('va_list')
|
||||
for c in reserved_type_param_names {
|
||||
t.register_type(c)
|
||||
t.register_builtin(c)
|
||||
}
|
||||
t.register_const('stdin', 'int', 'main', true)
|
||||
t.register_const('stdout', 'int', 'main', true)
|
||||
@@ -390,14 +390,14 @@ fn (t &Table) known_const(name string) bool {
|
||||
return true
|
||||
}
|
||||
|
||||
fn (t mut Table) register_type(typ string) {
|
||||
fn (t mut Table) register_builtin(typ string) {
|
||||
if typ.len == 0 {
|
||||
return
|
||||
}
|
||||
if typ in t.typesmap {
|
||||
return
|
||||
}
|
||||
t.typesmap[typ] = Type{name:typ}
|
||||
t.typesmap[typ] = Type{name:typ, is_public:true}
|
||||
}
|
||||
|
||||
fn (p mut Parser) register_type_with_parent(strtyp, parent string) {
|
||||
@@ -405,6 +405,7 @@ fn (p mut Parser) register_type_with_parent(strtyp, parent string) {
|
||||
name: strtyp
|
||||
parent: parent
|
||||
mod: p.mod
|
||||
is_public: true
|
||||
}
|
||||
p.table.register_type2(typ)
|
||||
}
|
||||
@@ -416,6 +417,7 @@ fn (t mut Table) register_type_with_parent(typ, parent string) {
|
||||
t.typesmap[typ] = Type {
|
||||
name: typ
|
||||
parent: parent
|
||||
is_public: true
|
||||
//mod: mod
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user