aboutsummaryrefslogtreecommitdiff
path: root/src/runMain/kotlin/exceptions/SyntaxError.kt
diff options
context:
space:
mode:
Diffstat (limited to 'src/runMain/kotlin/exceptions/SyntaxError.kt')
-rw-r--r--src/runMain/kotlin/exceptions/SyntaxError.kt4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/runMain/kotlin/exceptions/SyntaxError.kt b/src/runMain/kotlin/exceptions/SyntaxError.kt
index 3fc2a69..0596f52 100644
--- a/src/runMain/kotlin/exceptions/SyntaxError.kt
+++ b/src/runMain/kotlin/exceptions/SyntaxError.kt
@@ -1,6 +1,8 @@
package exceptions
+import TokenType
+
/**
* Gets thrown if the syntax is wrong
*/
-class SyntaxError(context: String = "") : Exception("Syntax error: $context") \ No newline at end of file
+class SyntaxError(context: Pair<String, TokenType>) : Exception("Unexpected ${context.second}: ${context.first}") \ No newline at end of file