aboutsummaryrefslogtreecommitdiff
path: root/parser.d
diff options
context:
space:
mode:
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;
-
}