mirror of
https://codeberg.org/ProgramSnail/lang.git
synced 2026-01-25 21:17:11 +00:00
or references, prining improvements, comments now printed, fixes
This commit is contained in:
parent
73263193a9
commit
5e70f0015f
19 changed files with 354 additions and 429 deletions
|
|
@ -14,9 +14,8 @@ enum class Type {
|
|||
|
||||
// --- definitions
|
||||
|
||||
TYPE_DEFINITION,
|
||||
FUNCTION_DEFINITION,
|
||||
TYPECLASS_DEFINITION,
|
||||
TYPE_DEFINITION, // datatype or typeclass
|
||||
|
||||
// --- flow control
|
||||
|
||||
|
|
@ -62,6 +61,8 @@ enum class Type {
|
|||
DEFINITION_INFO,
|
||||
ANNOTATION_INFO,
|
||||
|
||||
EXTRA,
|
||||
|
||||
EMPTY_LINES,
|
||||
|
||||
// --- tokens
|
||||
|
|
@ -100,9 +101,8 @@ const static std::string CONSTRAINT = "constraint";
|
|||
|
||||
// --- definitions
|
||||
|
||||
const static std::string TYPE_DEFINITION = "type_definition";
|
||||
const static std::string FUNCTION_DEFINITION = "function_definition";
|
||||
const static std::string TYPECLASS_DEFINITION = "typeclass_definition";
|
||||
const static std::string TYPE_DEFINITION = "type_definition";
|
||||
|
||||
// --- flow control
|
||||
|
||||
|
|
@ -148,6 +148,8 @@ const static std::string TYPE = "type";
|
|||
const static std::string DEFINITION_INFO = "definition_info";
|
||||
const static std::string ANNOTATION_INFO = "annotation_info";
|
||||
|
||||
const static std::string EXTRA = "extra";
|
||||
|
||||
const static std::string EMPTY_LINES = "empty_lines";
|
||||
|
||||
// --- tokens
|
||||
|
|
@ -180,12 +182,10 @@ inline Type string_to_type(const std::string &str) {
|
|||
return Type::IMPORT;
|
||||
} else if (str == CONSTRAINT) {
|
||||
return Type::CONSTRAINT;
|
||||
} else if (str == TYPE_DEFINITION) {
|
||||
return Type::TYPE_DEFINITION;
|
||||
} else if (str == FUNCTION_DEFINITION) {
|
||||
return Type::FUNCTION_DEFINITION;
|
||||
} else if (str == TYPECLASS_DEFINITION) {
|
||||
return Type::TYPECLASS_DEFINITION;
|
||||
} else if (str == TYPE_DEFINITION) {
|
||||
return Type::TYPE_DEFINITION;
|
||||
} else if (str == CASE) {
|
||||
return Type::CASE;
|
||||
} else if (str == MATCH) {
|
||||
|
|
@ -232,6 +232,8 @@ inline Type string_to_type(const std::string &str) {
|
|||
return Type::DEFINITION_INFO;
|
||||
} else if (str == ANNOTATION_INFO) {
|
||||
return Type::ANNOTATION_INFO;
|
||||
} else if (str == EXTRA) {
|
||||
return Type::EXTRA;
|
||||
} else if (str == EMPTY_LINES) {
|
||||
return Type::EMPTY_LINES;
|
||||
} else if (str == PLACEHOLDER) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue