Reader+Printer: Reorder tokens
This commit is contained in:
+17
-17
@@ -155,6 +155,23 @@ ASTNode* Reader::readSpliceUnquote()
|
||||
return list;
|
||||
}
|
||||
|
||||
ASTNode* Reader::readList()
|
||||
{
|
||||
ignore(); // (
|
||||
|
||||
List* list = new List();
|
||||
while (!isEOF() && peek().type != Token::Type::ParenClose) {
|
||||
list->addNode(readImpl());
|
||||
}
|
||||
|
||||
if (!consumeSpecific(Token { .type = Token::Type::ParenClose })) { // )
|
||||
m_error_character = ')';
|
||||
m_is_unbalanced = true;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
ASTNode* Reader::readVector()
|
||||
{
|
||||
ignore(); // [
|
||||
@@ -189,23 +206,6 @@ ASTNode* Reader::readHashMap()
|
||||
return vector;
|
||||
}
|
||||
|
||||
ASTNode* Reader::readList()
|
||||
{
|
||||
ignore(); // (
|
||||
|
||||
List* list = new List();
|
||||
while (!isEOF() && peek().type != Token::Type::ParenClose) {
|
||||
list->addNode(readImpl());
|
||||
}
|
||||
|
||||
if (!consumeSpecific(Token { .type = Token::Type::ParenClose })) { // )
|
||||
m_error_character = ')';
|
||||
m_is_unbalanced = true;
|
||||
}
|
||||
|
||||
return list;
|
||||
}
|
||||
|
||||
ASTNode* Reader::readQuote()
|
||||
{
|
||||
ignore(); // '
|
||||
|
||||
Reference in New Issue
Block a user