mirror of
https://github.com/voltrevo/ValueScript.git
synced 2026-01-14 16:08:02 -05:00
14 lines
342 B
Rust
14 lines
342 B
Rust
use super::vs_value::ValTrait;
|
|
use super::math::MATH;
|
|
use super::debug::DEBUG;
|
|
|
|
// TODO: Investigate whether a static array can be used for this and why rust
|
|
// seems to not like it when I try.
|
|
pub fn get_builtin(index: usize) -> &'static dyn ValTrait {
|
|
return match index {
|
|
0 => &MATH,
|
|
1 => &DEBUG,
|
|
_ => std::panic!(""),
|
|
}
|
|
}
|