Uploaded image for project: 'SonarSlang'
  1. SonarSlang
  2. SONARSLANG-98

Fix Kotlin lexing issue caused by line separators

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.0.1
    • Component/s: None
    • Labels:
      None

      Description

      When using Kotlin lexer, attempting to lex content from a file having CR+LF line separators will cause the parsing of the file to fail with the following error:

      org.jetbrains.kotlin.lexer.KotlinLexerException: Error: could not match input
      at ‘’
      ...[file content]...
      at org.jetbrains.kotlin.lexer._JetLexer.zzScanError(_JetLexer.java:814)
      at org.jetbrains.kotlin.lexer._JetLexer.advance(_JetLexer.java:1409)
      ...
      

      To prevent this error, file content should be normalized before calling the lexer.

        Attachments

          Activity

            People

            • Assignee:
              tibor.blenessy Tibor Blenessy
              Reporter:
              christophe.zurn Christophe Zurn
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Due:
                Created:
                Updated:
                Resolved: