Parser.hpp: Prevent the redefinition of functions
Signed-off-by: Username404 <w.iron.zombie@gmail.com>
This commit is contained in:
parent
f0128bf0c3
commit
a8e514d67f
|
@ -88,6 +88,8 @@ namespace Parser {
|
|||
i += parametersDistance;
|
||||
}
|
||||
if (nextAre({LCOMP, LCOMP, LBRACE})) {
|
||||
if (parseTree.template findReferenceByName<Function>(current.toktext).has_value())
|
||||
parsingError(current, " is already defined", true);
|
||||
Function function(current.toktext);
|
||||
if (parametersDistance > 2) {
|
||||
function.parameters = parse(filter_comma_list(lexed.begin() + ((i + 2) - parametersDistance), lexed.begin() + i));
|
||||
|
|
Loading…
Reference in New Issue