diff --git a/src/headers/parsing/ParseComponents.hpp b/src/headers/parsing/ParseComponents.hpp index f755603..f6edd22 100644 --- a/src/headers/parsing/ParseComponents.hpp +++ b/src/headers/parsing/ParseComponents.hpp @@ -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 {}; diff --git a/src/headers/parsing/Parser.hpp b/src/headers/parsing/Parser.hpp index b30109b..532f86b 100644 --- a/src/headers/parsing/Parser.hpp +++ b/src/headers/parsing/Parser.hpp @@ -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); } } }