Skip to content

Commit

Permalink
fix: small parser bug
Browse files Browse the repository at this point in the history
  • Loading branch information
jumanji144 committed Dec 2, 2023
1 parent 418934f commit d48dbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/source/pl/core/parser.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ namespace pl::core {

if (MATCHES(sequence(tkn::Separator::LeftBracket) && !peek(tkn::Separator::LeftBracket))) {
path.emplace_back(parseMathematicalExpression());
if (sequence<Not>(tkn::Separator::RightBracket))
if (!sequence(tkn::Separator::RightBracket))
err::P0002.throwError(fmt::format("Expected ']' at end of array indexing, got {}.", getFormattedToken(0)), {}, 1);
}

Expand Down Expand Up @@ -1600,7 +1600,7 @@ namespace pl::core {
while (true) {
this->m_currNamespace.back().push_back(getValue<Token::Identifier>(-1).get());

if (sequence<Not>(tkn::Operator::ScopeResolution, tkn::Literal::Identifier))
if (!sequence(tkn::Operator::ScopeResolution, tkn::Literal::Identifier))
break;
}

Expand Down

0 comments on commit d48dbae

Please sign in to comment.