Skip to content

Commit

Permalink
Polish RegexToken toString
Browse files Browse the repository at this point in the history
  • Loading branch information
alllex committed Aug 21, 2023
1 parent 22e1993 commit 08228c6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/commonMain/kotlin/me/alllex/parsus/token/RegexToken.kt
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ class RegexToken(
return match.value.length
}

override fun toString(): String = "RegexToken(${name ?: ""} [$pattern]${if (ignored) " [ignored]" else ""})"
override fun toString(): String = "RegexToken(${name?.let { "$it " } ?: ""}[$pattern]${if (ignored) " [ignored]" else ""})"
}

private fun Regex.withIgnoreCase(ignoreCase: Boolean) =
Expand Down

0 comments on commit 08228c6

Please sign in to comment.