Skip to content
This repository was archived by the owner on May 15, 2023. It is now read-only.

Commit

Permalink
Add toString to LixyGenericTokenType to properly print t. type name
Browse files Browse the repository at this point in the history
Turns out it's actually useful to have a name
  • Loading branch information
utybo committed May 4, 2020
1 parent 9055cff commit 5313645
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/commonMain/kotlin/guru/zoroark/lixy/LixyTokenType.kt
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,9 @@ interface LixyTokenType
*
* @property name A name for this token type, useful for debugging.
*/
class LixyGenericTokenType(val name: String) : LixyTokenType
class LixyGenericTokenType(val name: String) : LixyTokenType {
override fun toString(): String = "LixyGenericTokenType[$name]"
}

/**
* Creates a new, distinct token type and returns it. The returned token type is
Expand Down

0 comments on commit 5313645

Please sign in to comment.