compiler: add support for size_t

pull/4642/head
Delyan Angelov 2020-04-28 15:07:19 +03:00
parent 210b6e36b6
commit c6a15dba50
2 changed files with 3 additions and 2 deletions

View File

@ -10,7 +10,6 @@ const (
'vlib/eventbus/eventbus_test.v', 'vlib/eventbus/eventbus_test.v',
'vlib/json/json_test.v', 'vlib/json/json_test.v',
'vlib/net/http/http_httpbin_test.v', 'vlib/net/http/http_httpbin_test.v',
'vlib/net/http/http_test.v',
'vlib/v/tests/enum_bitfield_test.v', 'vlib/v/tests/enum_bitfield_test.v',
'vlib/v/tests/num_lit_call_method_test.v', 'vlib/v/tests/num_lit_call_method_test.v',
'vlib/v/tests/pointers_test.v', 'vlib/v/tests/pointers_test.v',

View File

@ -251,6 +251,7 @@ pub enum Kind {
f32 f32
f64 f64
char char
size_t
bool bool
none_ none_
string string
@ -416,7 +417,7 @@ pub fn (mut t Table) register_builtin_type_symbols() {
name: 'map' name: 'map'
}) })
t.register_type_symbol(TypeSymbol{ t.register_type_symbol(TypeSymbol{
kind: .placeholder kind: .size_t
name: 'size_t' name: 'size_t'
}) })
// TODO: remove. for v1 map compatibility // TODO: remove. for v1 map compatibility
@ -475,6 +476,7 @@ pub fn (k Kind) str() string {
.string { 'string' } .string { 'string' }
.char { 'char' } .char { 'char' }
.bool { 'bool' } .bool { 'bool' }
.size_t { 'size_t' }
.none_ { 'none' } .none_ { 'none' }
.array { 'array' } .array { 'array' }
.array_fixed { 'array_fixed' } .array_fixed { 'array_fixed' }