feat: 添加跳转指令支持及条件语句编译实现

This commit is contained in:
2026-02-20 17:02:13 +08:00
parent eb20993e27
commit abdb1d2fb0
8 changed files with 225 additions and 17 deletions

View File

@@ -94,6 +94,7 @@ namespace Fig
}
if (!match(TokenType::RightParen))
{
delete *result;
return std::unexpected(Error(ErrorType::SyntaxError,
"unclosed parenthese in if condition",
"insert `)`",
@@ -155,6 +156,7 @@ namespace Fig
state = State::ParsingIf;
if (!match(TokenType::RightParen))
{
delete *result;
return std::unexpected(Error(ErrorType::SyntaxError,
"unclosed parenthese in if condition",
"insert `)`",