Checkpoint
This commit is contained in:
parent
e749f8c6cb
commit
48f94c30df
15 changed files with 175 additions and 67 deletions
13
src/lexer/errors/LexingError.kt
Normal file
13
src/lexer/errors/LexingError.kt
Normal file
|
@ -0,0 +1,13 @@
|
|||
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()
|
||||
)
|
Reference in a new issue