Parse pointer types

This commit is contained in:
2024-04-07 23:39:56 +02:00
parent 0876e25f90
commit 986bcdd0c7
11 changed files with 344 additions and 101 deletions

View File

@ -159,6 +159,16 @@ False {
return static_cast<int>(elna::source::token::type::colon);
}
\^ {
yylval.nil = nullptr;
return static_cast<int>(elna::source::token::type::hat);
}
@ {
yylval.nil = nullptr;
return static_cast<int>(elna::source::token::type::at);
}
. {
return -1;
}
@ -172,10 +182,10 @@ result<lexer> tokenize(const std::filesystem::path& path)
std::vector<token> tokens;
yyin = fopen(path.c_str(), "rb");
if (yyin == nullptr)
{
throw std::ios_base::failure("File does not exist");
}
if (yyin == nullptr)
{
throw std::ios_base::failure("File does not exist");
}
do
{
yytoken = yylex();