mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2026-01-25 21:17:11 +00:00
type structure change, part done
This commit is contained in:
parent
78c696b99a
commit
522dd16f79
13 changed files with 386 additions and 218 deletions
|
|
@ -54,7 +54,10 @@ enum class Type {
|
|||
|
||||
VARIANT_TYPE,
|
||||
TUPLE_TYPE,
|
||||
TYPE,
|
||||
ARRAY_TYPE,
|
||||
REFERENCE_TYPE,
|
||||
MODIFIED_TYPE,
|
||||
SIMPLE_TYPE,
|
||||
|
||||
// --- comments
|
||||
|
||||
|
|
@ -141,7 +144,10 @@ const static std::string LAMBDA = "lambda";
|
|||
|
||||
const static std::string VARIANT_TYPE = "variant_type";
|
||||
const static std::string TUPLE_TYPE = "tuple_type";
|
||||
const static std::string TYPE = "type";
|
||||
const static std::string ARRAY_TYPE = "array_type";
|
||||
const static std::string REFERENCE_TYPE = "reference_type";
|
||||
const static std::string MODIFIED_TYPE = "modified_type";
|
||||
const static std::string SIMPLE_TYPE = "simple_type";
|
||||
|
||||
// --- comments
|
||||
|
||||
|
|
@ -226,8 +232,14 @@ inline Type string_to_type(const std::string &str) {
|
|||
return Type::VARIANT_TYPE;
|
||||
} else if (str == TUPLE_TYPE) {
|
||||
return Type::TUPLE_TYPE;
|
||||
} else if (str == TYPE) {
|
||||
return Type::TYPE;
|
||||
} else if (str == ARRAY_TYPE) {
|
||||
return Type::ARRAY_TYPE;
|
||||
} else if (str == REFERENCE_TYPE) {
|
||||
return Type::REFERENCE_TYPE;
|
||||
} else if (str == MODIFIED_TYPE) {
|
||||
return Type::MODIFIED_TYPE;
|
||||
} else if (str == SIMPLE_TYPE) {
|
||||
return Type::SIMPLE_TYPE;
|
||||
} else if (str == DEFINITION_INFO) {
|
||||
return Type::DEFINITION_INFO;
|
||||
} else if (str == ANNOTATION_INFO) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue