mirror of
https://github.com/icewind1991/ivory.git
synced 2026-06-03 10:44:09 +02:00
add internal zval types
This commit is contained in:
parent
f0ccd7ae1c
commit
9c4f3ab8a0
1 changed files with 22 additions and 0 deletions
|
|
@ -117,6 +117,19 @@ pub enum ZValType {
|
||||||
Object = 8,
|
Object = 8,
|
||||||
Resource = 9,
|
Resource = 9,
|
||||||
Reference = 10,
|
Reference = 10,
|
||||||
|
|
||||||
|
// internal types
|
||||||
|
ConstantAST = 11,
|
||||||
|
Indirect = 13,
|
||||||
|
Ptr = 14,
|
||||||
|
Err = 15,
|
||||||
|
|
||||||
|
// fake types for type hinting
|
||||||
|
Bool = 16,
|
||||||
|
Callable = 17,
|
||||||
|
Iterable = 18,
|
||||||
|
Void = 19,
|
||||||
|
Number = 20,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl Display for ZValType {
|
impl Display for ZValType {
|
||||||
|
|
@ -133,6 +146,15 @@ impl Display for ZValType {
|
||||||
ZValType::Object => write!(f, "object"),
|
ZValType::Object => write!(f, "object"),
|
||||||
ZValType::Resource => write!(f, "resource"),
|
ZValType::Resource => write!(f, "resource"),
|
||||||
ZValType::Reference => write!(f, "reference"),
|
ZValType::Reference => write!(f, "reference"),
|
||||||
|
ZValType::ConstantAST => write!(f, "constant ast"),
|
||||||
|
ZValType::Indirect => write!(f, "indirect"),
|
||||||
|
ZValType::Ptr => write!(f, "pointer"),
|
||||||
|
ZValType::Err => write!(f, "error"),
|
||||||
|
ZValType::Bool => write!(f, "bool"),
|
||||||
|
ZValType::Callable => write!(f, "callable"),
|
||||||
|
ZValType::Iterable => write!(f, "iterable"),
|
||||||
|
ZValType::Void => write!(f, "void"),
|
||||||
|
ZValType::Number => write!(f, "number"),
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue