@@ -266,12 +266,12 @@ class GeneRegexJavaVisitor : RegexJavaBaseVisitor<VisitResult>(){
266266 list.addAll(rec)
267267 } else {
268268 val startText = ctx.classAtom()[0 ].text
269- assert (startText.length == 1 || startText.length== 2 ) // single chars or \+ and \. escaped chars
269+ assert (startText.length == 1 || startText.length == 2 ) // single chars or \+ and \. escaped chars
270270
271- val start : Char
271+ val start: Char
272272 val end: Char
273273
274- if (startText.length== 1 ) {
274+ if (startText.length == 1 ) {
275275 start = startText[0 ]
276276 end = if (ctx.classAtom().size == 2 ) {
277277 ctx.classAtom()[1 ].text[0 ]
@@ -283,7 +283,7 @@ class GeneRegexJavaVisitor : RegexJavaBaseVisitor<VisitResult>(){
283283 // This case handles the \. and \+ cases
284284 // wheren . and + should be treated as
285285 // regular chars
286- assert (startText== " \\ +" || startText== " \\ ." )
286+ assert (startText == " \\ +" || startText == " \\ ." )
287287 start = startText[1 ]
288288 end = start
289289 }
@@ -351,12 +351,12 @@ class GeneRegexJavaVisitor : RegexJavaBaseVisitor<VisitResult>(){
351351 res.data = if (ctx.atomEscape() != null ) {
352352 when (val rec = ctx.atomEscape().accept(this ).genes[0 ]) {
353353 is CharacterClassEscapeRxGene -> {
354- rec.charClassRepr.internalRanges
354+ rec.multiCharRange.ranges
355355 }
356356
357357 is PatternCharacterBlockGene -> {
358358 if (rec.stringBlock.length > 1 ) throw IllegalArgumentException (" CharClass element cannot be strings" )
359- else listOf (rec.stringBlock[0 ] to rec.stringBlock[0 ])
359+ else listOf (CharacterRange ( rec.stringBlock[0 ], rec.stringBlock[0 ]) )
360360 }
361361
362362 else -> throw IllegalArgumentException (" Unexpected CharClass content" )
0 commit comments