From 8367e17381fb8a1484c277d7fedea231586c35fc Mon Sep 17 00:00:00 2001 From: jorenchik Date: Sat, 23 Nov 2024 14:55:19 +0200 Subject: [PATCH] remove SOF token --- src/include/lexer.h | 1 - src/transpiler/lexer.cpp | 1 - src/transpiler/parser.cpp | 5 ----- 3 files changed, 7 deletions(-) diff --git a/src/include/lexer.h b/src/include/lexer.h index f2c2407..cbb9374 100644 --- a/src/include/lexer.h +++ b/src/include/lexer.h @@ -15,7 +15,6 @@ enum class TokenType { Cooldown, CooldownStart, CooldownEnd, - StartOfFile, EndOfFile }; diff --git a/src/transpiler/lexer.cpp b/src/transpiler/lexer.cpp index 7866989..f41d7aa 100644 --- a/src/transpiler/lexer.cpp +++ b/src/transpiler/lexer.cpp @@ -280,7 +280,6 @@ std::string Token::toString(const TokenType* ttype) { case TokenType::Cooldown: return "pārtraukums"; case TokenType::CooldownStart: return "pātraukuma sākums"; case TokenType::CooldownEnd: return "pātraukuma beigas"; - case TokenType::StartOfFile: return "faila sākums"; case TokenType::EndOfFile: return "faila beigas"; default: return "neatpazīta tekstvienība"; } diff --git a/src/transpiler/parser.cpp b/src/transpiler/parser.cpp index b9cd943..499f8ac 100644 --- a/src/transpiler/parser.cpp +++ b/src/transpiler/parser.cpp @@ -61,11 +61,6 @@ void initTransitions() { (*transitions)[TokenType::CooldownEnd] = { TokenType::TextFragment }; - (*transitions)[TokenType::StartOfFile] = { - TokenType::TextFragment, - TokenType::ElementDashStart, - TokenType::EndOfFile - }; (*transitions)[TokenType::EndOfFile] = {}; }