mirror of
https://github.com/vlang/v.git
synced 2023-08-10 21:13:21 +03:00
v2: parse builtin.v, cfns.v float.v
This commit is contained in:
@@ -92,6 +92,11 @@ pub const (
|
||||
name: 'bool'
|
||||
idx: bool_type_idx
|
||||
}
|
||||
byte_type = Type{
|
||||
kind: .byte
|
||||
name: 'byte'
|
||||
idx: byte_type_idx
|
||||
}
|
||||
)
|
||||
/*
|
||||
pub fn (t Type) str() string {
|
||||
|
||||
@@ -251,6 +251,13 @@ pub fn (t mut Table) register_type(typ Type) int {
|
||||
return idx
|
||||
}
|
||||
|
||||
pub fn (t &Table) known_type(name string) bool {
|
||||
_ = t.find_type(name) or {
|
||||
return false
|
||||
}
|
||||
return true
|
||||
}
|
||||
|
||||
pub fn (t mut Table) find_or_register_map(key_typ &Type, value_typ &Type) (int,string) {
|
||||
name := 'map_${key_typ.name}_${value_typ.name}'
|
||||
// existing
|
||||
|
||||
Reference in New Issue
Block a user