aboutsummaryrefslogtreecommitdiff
path: root/src/runMain/kotlin/Syntax.kt
diff options
context:
space:
mode:
authorMarvin Borner2019-08-17 18:46:00 +0200
committerMarvin Borner2019-08-17 18:46:00 +0200
commit777c20de7791fd254ce747f7d7ab4b681c5a6001 (patch)
tree285672ccb4a147199b4c243bd5f6117a7759e7e0 /src/runMain/kotlin/Syntax.kt
parent266b4b26bb643190bcf87753dcbcf6bb6800a1bd (diff)
Renaming and semantic testing
Diffstat (limited to 'src/runMain/kotlin/Syntax.kt')
-rw-r--r--src/runMain/kotlin/Syntax.kt11
1 files changed, 1 insertions, 10 deletions
diff --git a/src/runMain/kotlin/Syntax.kt b/src/runMain/kotlin/Syntax.kt
index 54a0ebe..950cd4c 100644
--- a/src/runMain/kotlin/Syntax.kt
+++ b/src/runMain/kotlin/Syntax.kt
@@ -97,7 +97,7 @@ class Syntax {
Classifier -> Unit
Empty -> Unit
StatementEnd -> Unit
- Skip -> throw UnknownType(token.content)
+ Skip -> throw LexicalError(token.content)
}
}
@@ -110,13 +110,4 @@ class Syntax {
throw SyntaxError(token.type.toString().toLowerCase(), token.content, token.lineNumber)
}
}
-
- /**
- * Finds the next non empty token by [index]
- */
- private fun nextNonEmpty(statement: MutableList<Token>, index: Int): Token {
- var i = index + 1
- while (statement[i].type == Empty) i++
- return statement[i]
- }
} \ No newline at end of file