mirror of
https://github.com/MihailRis/voxelcore.git
synced 2026-10-05 19:11:50 +00:00
relative values, types check
This commit is contained in:
parent
17426705ae
commit
b38128ef39
6 changed files with 185 additions and 19 deletions
|
|
@ -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) {
|
||||
|
|
|
|||
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue