Skip to content

Commit

Permalink
fix: returned precise highlight for functions params, generics and types
Browse files Browse the repository at this point in the history
  • Loading branch information
mkslanc committed Jul 25, 2022
1 parent a30a99d commit 967aa6b
Show file tree
Hide file tree
Showing 2 changed files with 189 additions and 83 deletions.
145 changes: 70 additions & 75 deletions lib/ace/mode/_test/tokens_kotlin.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,19 +43,19 @@
],[
"start",
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","width"],
["entity.name.variable.kotlin","width"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["punctuation.kotlin",","]
],[
"start",
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","height"],
["entity.name.variable.kotlin","height"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
Expand All @@ -76,12 +76,12 @@
["text"," "],
["paren.lparen","("],
["storage.type.buildin.kotlin","Int"],
["punctuation.kotlin",","],
["punctuation",","],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["paren.rparen",")"],
["text"," "],
["keyword.operator.kotlin","->"],
["keyword.operator.declaration.kotlin","->"],
["text"," "],
["storage.type.buildin.kotlin","Boolean"]
],[
Expand All @@ -94,21 +94,21 @@
["text"," "],
["storage.modifier.kotlin","private"],
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","live"],
["entity.name.variable.kotlin","live"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["storage.type.buildin.kotlin","Array"],
["keyword.operator.kotlin","<"],
["storage.type.buildin.kotlin","Array"],
["keyword.operator.kotlin","<"],
["storage.type.buildin.kotlin","Boolean"],
["keyword.operator.kotlin",">>"],
["punctuation","<"],
["storage.type.generic.kotlin","Array"],
["punctuation","<"],
["storage.type.generic.kotlin","Boolean"],
["punctuation",">>"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
["storage.type.buildin.kotlin","Array"],
["identifier","Array"],
["paren.lparen","("],
["identifier","height"],
["paren.rparen",")"],
Expand All @@ -119,7 +119,7 @@
["text"," "],
["keyword.operator.kotlin","->"],
["text"," "],
["storage.type.buildin.kotlin","Array"],
["identifier","Array"],
["paren.lparen","("],
["identifier","width"],
["paren.rparen",")"],
Expand Down Expand Up @@ -148,18 +148,18 @@
["text"," "],
["storage.modifier.kotlin","private"],
["text"," "],
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","liveCount"],
["entity.name.variable.kotlin","liveCount"],
["paren.lparen","("],
["identifier","i"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","i"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["punctuation.kotlin",","],
["text"," "],
["identifier","j"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","j"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["paren.rparen",")"]
Expand Down Expand Up @@ -225,18 +225,18 @@
],[
"start",
["text"," "],
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","liveNeighbors"],
["entity.name.variable.kotlin","liveNeighbors"],
["paren.lparen","("],
["identifier","i"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","i"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["punctuation.kotlin",","],
["text"," "],
["identifier","j"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","j"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["paren.rparen",")"],
Expand Down Expand Up @@ -395,18 +395,18 @@
["text"," "],
["storage.modifier.kotlin","operator"],
["text"," "],
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["entity.name.function.kotlin","get"],
["entity.name.variable.kotlin","get"],
["paren.lparen","("],
["identifier","i"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","i"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["punctuation.kotlin",","],
["text"," "],
["identifier","j"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","j"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["paren.rparen",")"],
Expand All @@ -431,7 +431,7 @@
["text"," "],
["identifier","Test"],
["text"," "],
["storage.modifier.kotlin","public"],
["keyword","public"],
["text"," "],
["keyword","constructor"],
["text"," "],
Expand All @@ -441,9 +441,9 @@
["paren.rparen","}"]
],[
"start",
["storage.modifier.kotlin","var"],
["keyword.other.kotlin","var"],
["text"," "],
["identifier","test"],
["entity.name.variable.kotlin","test"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
Expand All @@ -464,19 +464,16 @@
["comment"," */"]
],[
"start",
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","next"],
["entity.name.variable.kotlin","next"],
["paren.lparen","("],
["identifier","field"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["identifier","Field"],
["variable.parameter.function.kotlin","field"],
["keyword.operator",":"],
["text"," Field"],
["paren.rparen",")"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["identifier","Field"],
["text"," "],
["text"," Field "],
["paren.lparen","{"]
],[
"start",
Expand Down Expand Up @@ -506,9 +503,9 @@
],[
"start",
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","n"],
["entity.name.variable.kotlin","n"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
Expand Down Expand Up @@ -582,17 +579,17 @@
["comment","/** A few colony examples here */"]
],[
"start",
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","main"],
["entity.name.variable.kotlin","main"],
["paren.lparen","("],
["identifier","args"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","args"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Array"],
["keyword.operator.kotlin","<"],
["storage.type.buildin.kotlin","String"],
["keyword.operator.kotlin",">"],
["punctuation","<"],
["storage.type.generic.kotlin","String"],
["punctuation",">"],
["paren.rparen",")"],
["text"," "],
["paren.lparen","{"]
Expand Down Expand Up @@ -803,18 +800,18 @@
"start"
],[
"start",
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","runGameOfLife"],
["entity.name.variable.kotlin","runGameOfLife"],
["paren.lparen","("],
["identifier","fieldText"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","fieldText"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","String"],
["punctuation.kotlin",","],
["text"," "],
["identifier","steps"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","steps"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","Int"],
["paren.rparen",")"],
Expand All @@ -823,9 +820,9 @@
],[
"start",
["text"," "],
["storage.modifier.kotlin","var"],
["keyword.other.kotlin","var"],
["text"," "],
["identifier","field"],
["entity.name.variable.kotlin","field"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
Expand Down Expand Up @@ -961,26 +958,24 @@
"start"
],[
"start",
["keyword","fun"],
["keyword.other.kotlin","fun"],
["text"," "],
["identifier","makeField"],
["entity.name.variable.kotlin","makeField"],
["paren.lparen","("],
["identifier","s"],
["keyword.operator.declaration.kotlin",":"],
["variable.parameter.function.kotlin","s"],
["keyword.operator",":"],
["text"," "],
["storage.type.buildin.kotlin","String"],
["paren.rparen",")"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["identifier","Field"],
["text"," "],
["text"," Field "],
["paren.lparen","{"]
],[
"start",
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","lines"],
["entity.name.variable.kotlin","lines"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
Expand Down Expand Up @@ -1014,9 +1009,9 @@
],[
"start",
["text"," "],
["storage.modifier.kotlin","val"],
["keyword.other.kotlin","val"],
["text"," "],
["identifier","longestLine"],
["entity.name.variable.kotlin","longestLine"],
["text"," "],
["keyword.operator.assignment.kotlin","="],
["text"," "],
Expand All @@ -1035,8 +1030,8 @@
["identifier","length"],
["text"," "],
["paren.rparen","}"],
["text"," ?"],
["keyword.operator.declaration.kotlin",":"],
["text"," "],
["keyword.operator.kotlin","?:"],
["text"," "],
["string","\"\""]
],[
Expand Down
Loading

0 comments on commit 967aa6b

Please sign in to comment.