loom
1/*
2MIT License
3
4Copyright (c) 2022 МГТУ им. Н.Э. Баумана, кафедра ИУ-6, Михаил Фетисов,
5
6https://bmstu.codes/lsx/simodo/loom
7*/
8
9#include "simodo/variable/Variable.h"
10
11std::string simodo::variable::getValueTypeName(ValueType type) noexcept
12{
13std::string s;
14
15switch(type)
16{
17case ValueType::Null:
18s = "null";
19break;
20case ValueType::Bool:
21s = "bool";
22break;
23case ValueType::Int:
24s = "int";
25break;
26case ValueType::Float:
27s = "float";
28break;
29case ValueType::String:
30s = "string";
31break;
32case ValueType::Function:
33s = "function";
34break;
35case ValueType::Object:
36s = "object";
37break;
38case ValueType::Array:
39s = "array";
40break;
41case ValueType::Ref:
42s = "ref";
43break;
44case ValueType::ExtFunction:
45s = "function (external)";
46break;
47case ValueType::IntFunction:
48s = "function (internal)";
49break;
50default:
51s = UNDEF_STRING;
52break;
53}
54
55return s;
56}
57