From 777c20de7791fd254ce747f7d7ab4b681c5a6001 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sat, 17 Aug 2019 18:46:00 +0200 Subject: Renaming and semantic testing --- src/runMain/kotlin/Syntax.kt | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'src/runMain/kotlin/Syntax.kt') 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, index: Int): Token { - var i = index + 1 - while (statement[i].type == Empty) i++ - return statement[i] - } } \ No newline at end of file -- cgit v1.2.3