relative values, types check

This commit is contained in:
MihailRis
2024-05-10 16:05:46 +03:00
parent 17426705ae
commit b38128ef39
6 changed files with 185 additions and 19 deletions
+7
View File
@@ -171,6 +171,13 @@ char BasicParser::peek() {
return source[pos];
}
char BasicParser::peekNoJump() {
if (pos >= source.length()) {
throw error("unexpected end");
}
return source[pos];
}
std::string_view BasicParser::readUntil(char c) {
int start = pos;
while (hasNext() && source[pos] != c) {
+1
View File
@@ -99,6 +99,7 @@ public:
std::string parseName();
bool hasNext();
char peek();
char peekNoJump();
char nextChar();
BasicParser(std::string_view file, std::string_view source);