This commit is contained in:
parent
c4d7c9e2d8
commit
e30bfe1686
@ -1,6 +1,5 @@
|
|||||||
#include <cstdint>
|
|
||||||
#include "NumericalLexers.hpp"
|
#include "NumericalLexers.hpp"
|
||||||
|
#include <cstdint>
|
||||||
|
|
||||||
uint8_t LexDecimalValue(char8_t c) {
|
uint8_t LexDecimalValue(char8_t c) {
|
||||||
switch (c) {
|
switch (c) {
|
||||||
|
@ -496,8 +496,7 @@ namespace MalachScript::Parser {
|
|||||||
}
|
}
|
||||||
if (current->GetKind() != LexTokenKind::CloseCurlyParenthesisSymbol) {
|
if (current->GetKind() != LexTokenKind::CloseCurlyParenthesisSymbol) {
|
||||||
LogError(Diagnostics::DiagnosticType::UnexpectedToken, current->GetSpan());
|
LogError(Diagnostics::DiagnosticType::UnexpectedToken, current->GetSpan());
|
||||||
}
|
} else {
|
||||||
else{
|
|
||||||
PROGRESS_TOKEN(current);
|
PROGRESS_TOKEN(current);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -38,7 +38,8 @@ PARSE_TEST("Parse class with virtprop", "class foobar { private bool foo { get;
|
|||||||
REQUIRE(script->GetStatements().size() == 1);
|
REQUIRE(script->GetStatements().size() == 1);
|
||||||
auto firstStatement = script->GetStatements()[0].get();
|
auto firstStatement = script->GetStatements()[0].get();
|
||||||
REQUIRE(firstStatement->GetKind() == Parser::ParsedStatementKind::Class);
|
REQUIRE(firstStatement->GetKind() == Parser::ParsedStatementKind::Class);
|
||||||
auto firstClassStatement = dynamic_cast<const MalachScript::Parser::ParsedClassStatement*>(firstStatement)->GetBody()[0].get();
|
auto firstClassStatement =
|
||||||
|
dynamic_cast<const MalachScript::Parser::ParsedClassStatement*>(firstStatement)->GetBody()[0].get();
|
||||||
REQUIRE(firstClassStatement->GetKind() == Parser::ParsedStatementKind::VirtProp);
|
REQUIRE(firstClassStatement->GetKind() == Parser::ParsedStatementKind::VirtProp);
|
||||||
auto virtPropStatement = dynamic_cast<const MalachScript::Parser::ParsedVirtPropStatement*>(firstClassStatement);
|
auto virtPropStatement = dynamic_cast<const MalachScript::Parser::ParsedVirtPropStatement*>(firstClassStatement);
|
||||||
REQUIRE(virtPropStatement->GetAccess() == MalachScript::AccessModifier::Private);
|
REQUIRE(virtPropStatement->GetAccess() == MalachScript::AccessModifier::Private);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user