完成Lexer实现,100%可靠

This commit is contained in:
2026-02-14 14:54:44 +08:00
parent 877253cbbc
commit 35b98c4d7f
15 changed files with 634 additions and 126 deletions

View File

@@ -2,7 +2,7 @@
namespace Fig
{
const HashMap<String, TokenType> Token::symbolMap = {
const HashMap<String, TokenType> Token::punctMap = {
// 三字符
{String("..."), TokenType::TripleDot},
// 双字符
@@ -83,5 +83,8 @@ namespace Fig
{String("throw"), TokenType::Throw},
{String("Finally"), TokenType::Finally},
{String("as"), TokenType::As},
{String("true"), TokenType::LiteralTrue},
{String("false"), TokenType::LiteralFalse},
{String("null"), TokenType::LiteralNull},
};
};