inital basical executor

This commit is contained in:
Kurt Hutten IrevDev
2022-11-14 14:04:23 +11:00
parent aed0763770
commit c3b415d1f2
3 changed files with 113 additions and 0 deletions

View File

@ -370,6 +370,9 @@ export const abstractSyntaxTree = (tokens: Token[]): Program => {
if (typeof token === "undefined") {
console.log("probably should throw");
}
if (token.type === 'whitespace') {
return startTree(tokens, tokenIndex + 1, previousBody);
}
if (token.type === "word" && token.value === "const") {
const { declaration, lastIndex } = makeVariableDeclaration(
tokens,