aboutsummaryrefslogtreecommitdiff
path: root/parser.d
diff options
context:
space:
mode:
authormryouse2023-05-28 00:55:50 +0000
committermryouse2023-05-28 00:55:50 +0000
commit2312e0231eb2667858b1c712c20d0891cabfc74d (patch)
tree64f7b973974725b50ea527d9e1bc0ecc298cc084 /parser.d
parent82df87bda882fadf7d5c11de50f8fe7628aa0448 (diff)
cleanup
Diffstat (limited to 'parser.d')
-rw-r--r--parser.d20
1 files changed, 0 insertions, 20 deletions
diff --git a/parser.d b/parser.d
index 440cae0..c62a762 100644
--- a/parser.d
+++ b/parser.d
@@ -24,13 +24,6 @@ enum FormType {
PARSE_ERROR
}
-/*
-struct Form {
- FormType type;
- bool evaluate;
-}
-*/
-
abstract class Form {
FormType type;
bool evaluate;
@@ -38,9 +31,6 @@ abstract class Form {
ValueType returnType = ValueType.ANY;
- //ubyte compile(Chunk chunk);
- //ubyte[] asBytecode();
- //abstract void compile(Chunk chunk);
void compile(Chunk chunk) {
writeln("writing default op");
chunk.writeOp(OpCode.OP_NIL, line);
@@ -398,27 +388,18 @@ class Parser {
if (pos < source.length) {
return source[pos];
} else {
- //writeln("peek returns null");
return '\0';
}
}
char advance() {
if (!peekable()) {
- //writeln("trying to advance() beyond the end!!!");
return '\0';
} else {
char ret = peek();
pos++;
return ret;
}
- /*
- char ret = peek();
- if (ret != '\0') {
- pos++;
- }
- return ret;
- */
}
void skipWhitespace() {
@@ -644,7 +625,6 @@ class Parser {
advance(); // consume closing paren
return block;
-
}