Add a Reference structure to the StandardComponents namespace.
This commit is contained in:
parent
43136672bd
commit
9871cc66c7
|
@ -31,6 +31,9 @@ namespace StandardComponents {
|
|||
explicit Define(const bool& isFinal, string_view nameText): NamedIdentifier(nameText), final(isFinal) {}
|
||||
explicit Define(string_view nameText): Define(false, nameText) {}
|
||||
};
|
||||
struct Reference: NamedIdentifier {
|
||||
using NamedIdentifier::NamedIdentifier;
|
||||
};
|
||||
|
||||
struct Class: NamedIdentifier {
|
||||
struct Constructor {};
|
||||
|
|
|
@ -28,6 +28,8 @@ namespace Parser {
|
|||
if (isFinalDefine || next.toktype == tok::DEFINE) {
|
||||
parseTree << Define(isFinalDefine, current.toktext);
|
||||
i += isFinalDefine ? 2 : 1;
|
||||
} else {
|
||||
parseTree << Reference(current.toktext);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue