More stuff related to lists

This commit is contained in:
2025-05-12 20:04:38 +10:00
parent 7f4e87f768
commit b7febe7f1c
10 changed files with 101 additions and 8 deletions

View File

@@ -72,7 +72,7 @@ void Parser::parseLines(string in, Logger log) {
}
terms.push_back(termBuffer);
termBuffer.clear();
} else if ((c == ',' || c == '{' || c == '}' || c == '(' || c == ')') && !isString) {
} else if ((c == ',' || c == '{' || c == '}' || c == '(' || c == ')' || c == '[' || c == ']') && !isString) {
if (!buffer.empty()) {
termBuffer.push_back(buffer);
buffer.clear();
@@ -120,6 +120,7 @@ void Parser::processLines() {
else if (ct == "let") token.keyword = keywords::LET;
else if (ct == "print") token.keyword = keywords::PRINT;
else if (ct == "println") token.keyword = keywords::PRINTLN;
else if (ct == "printlist") token.keyword = keywords::PRINTLIST;
else if (ct == "input") token.keyword = keywords::INPUT;
else if (ct == "return") token.keyword = keywords::RETURN;
else if (ct == "exit") token.keyword = keywords::EXIT;