13 lines
281 B
Kotlin
13 lines
281 B
Kotlin
package lexer.errors
|
|
|
|
import lexer.state.LexerPosition
|
|
|
|
data class LexingError(
|
|
val type: LexingErrorType,
|
|
override val message: String,
|
|
val position: LexerPosition
|
|
) : Throwable(
|
|
"""
|
|
${position.line}:${position.column + 1} ${type}: $message
|
|
""".trimIndent()
|
|
)
|