Skip to content

Commit

Permalink
add java support
Browse files Browse the repository at this point in the history
  • Loading branch information
tkhskt committed Apr 16, 2022
1 parent 6b9f7f8 commit 3e2185f
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ import com.tkhskt.glsl_tokenizer_kt.Operators.operators

object GlslTokenizer {

@JvmStatic
@JvmOverloads
fun tokenize(data: String, version: Version = Version.ES10): List<GlslToken> {
val tokenizer = TokenizerInternal(version)
return tokenizer.tokenize(data)
Expand Down Expand Up @@ -321,8 +323,8 @@ object GlslTokenizer {

private fun determineOperator(buf: List<String>): Boolean {
var j = 0
var idx = 0
var res = ""
var idx: Int
var res: String

do {
idx = operators.indexOf(buf.slice(0 until buf.size + j).joinToString(""))
Expand Down

0 comments on commit 3e2185f

Please sign in to comment.