pretty (OwO)

This commit is contained in:
nora 2022-05-16 12:32:56 +02:00
parent deefc18959
commit 04dd019806

View file

@ -11,7 +11,7 @@ function lex(string) {
if (['+', '-', '>', '<', '.', ',', '[', ']'].includes(char)) {
tokens.push({
char,
span: i
span: i,
});
}
}
@ -29,13 +29,13 @@ function Parser(tokens) {
this.position = 0;
}
Parser.prototype.next = function() {
Parser.prototype.next = function () {
const token = this.tokens[this.position];
this.position++;
return token;
};
Parser.prototype.parse = function(isLoop) {
Parser.prototype.parse = function (isLoop) {
const body = [];
let nextToken;
while ((nextToken = this.next()) !== undefined) {