Added symbols/operators to lexer

This commit is contained in:
Pasha Bibko
2025-07-21 17:34:47 +01:00
parent a6afeff493
commit 24fde1b770
6 changed files with 158 additions and 96 deletions

View File

@@ -75,14 +75,14 @@ namespace LXC::Util
// Finds the location of a given index within a file //
inline bool GetFileLocationAtIndex(FileLocation& location, const std::string& file, __int32 index)
{
// Returns false if outside the bounds //
if (index < 0 || index > file.length())
return false;
// Resets location //
location.line = 1;
location.col = 1;
// Returns false if outside the bounds //
if (index < 0 || index > file.length())
return false;
// Finds the location //
__int32 localIndex = 0;
while (localIndex != index)

View File

@@ -2,6 +2,7 @@
// Standard libraries //
#include <unordered_map>
#include <vector>
// LXC util files //