createSolsParser function
This commit is contained in:
@@ -1,5 +1,19 @@
|
||||
#include "parser.h"
|
||||
#include "SolsNode.h"
|
||||
|
||||
#include "../include/estr.h"
|
||||
|
||||
ResultType(SolsParser, charptr) createSolsParser(SolsTokens* input) {
|
||||
return Error(SolsParser, charptr, "Work in progress");
|
||||
ResultType(SolsNode, charptr) node = createSolsNode(SNT_ROOT);
|
||||
if (node.error) {
|
||||
Estr str = CREATE_ESTR(node.as.error);
|
||||
APPEND_ESTR(str, " (in createSolsParser() function)");
|
||||
}
|
||||
SolsParser parser = {
|
||||
.input = input,
|
||||
.current = 0,
|
||||
.output = node.as.success
|
||||
};
|
||||
parser.currentParent = &parser.output;
|
||||
return Success(SolsParser, charptr, parser);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user