Added "dollar operator" to get the current offset

This commit is contained in:
WerWolv
2021-01-20 22:56:31 +01:00
parent 31426a289c
commit f0ab13ebc3
3 changed files with 8 additions and 1 deletions

View File

@@ -97,6 +97,8 @@ namespace hex::lang {
} else if (MATCHES(sequence(IDENTIFIER))) {
std::vector<std::string> path;
return this->parseRValue(path);
} else if (MATCHES(sequence(OPERATOR_DOLLAR))) {
return new ASTNodeRValue({ "$" });
} else
throwParseError("expected integer or parenthesis");
}