Remove the ParseComponents constructor declaration and make NamedIdentifier.name a const variable again
This commit is contained in:
parent
e8b2f90263
commit
43136672bd
|
@ -17,15 +17,14 @@ using namespace std;
|
||||||
#define IS_PARSECOMPONENT IS(ParseComponent)
|
#define IS_PARSECOMPONENT IS(ParseComponent)
|
||||||
struct ParseComponent {
|
struct ParseComponent {
|
||||||
[[nodiscard]] const type_info& getId() const { return typeid(*this); }
|
[[nodiscard]] const type_info& getId() const { return typeid(*this); }
|
||||||
ParseComponent() = default;
|
|
||||||
virtual ~ParseComponent() = default;
|
virtual ~ParseComponent() = default;
|
||||||
};
|
};
|
||||||
|
|
||||||
namespace StandardComponents {
|
namespace StandardComponents {
|
||||||
struct [[deprecated]] Expression: ParseComponent {};
|
struct [[deprecated]] Expression: ParseComponent {};
|
||||||
struct NamedIdentifier: public ParseComponent {
|
struct NamedIdentifier: public ParseComponent {
|
||||||
string name;
|
const string name;
|
||||||
explicit NamedIdentifier(string_view nameText): ParseComponent(), name(nameText) {}
|
explicit NamedIdentifier(string_view nameText): name(nameText) {}
|
||||||
};
|
};
|
||||||
struct Define: NamedIdentifier {
|
struct Define: NamedIdentifier {
|
||||||
const bool final;
|
const bool final;
|
||||||
|
@ -41,7 +40,7 @@ namespace StandardComponents {
|
||||||
namespace types {
|
namespace types {
|
||||||
struct String: ParseComponent {
|
struct String: ParseComponent {
|
||||||
const char* content;
|
const char* content;
|
||||||
explicit String(const char* string): ParseComponent(), content(string) {}
|
explicit String(const char* string): content(string) {}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue