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)
|
||||
struct ParseComponent {
|
||||
[[nodiscard]] const type_info& getId() const { return typeid(*this); }
|
||||
ParseComponent() = default;
|
||||
virtual ~ParseComponent() = default;
|
||||
};
|
||||
|
||||
namespace StandardComponents {
|
||||
struct [[deprecated]] Expression: ParseComponent {};
|
||||
struct NamedIdentifier: public ParseComponent {
|
||||
string name;
|
||||
explicit NamedIdentifier(string_view nameText): ParseComponent(), name(nameText) {}
|
||||
const string name;
|
||||
explicit NamedIdentifier(string_view nameText): name(nameText) {}
|
||||
};
|
||||
struct Define: NamedIdentifier {
|
||||
const bool final;
|
||||
|
@ -41,7 +40,7 @@ namespace StandardComponents {
|
|||
namespace types {
|
||||
struct String: ParseComponent {
|
||||
const char* content;
|
||||
explicit String(const char* string): ParseComponent(), content(string) {}
|
||||
explicit String(const char* string): content(string) {}
|
||||
};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue