Remove \r before lexer pass

\r aren't recognized by lexer and cause "Error: could not match input" warnings.
This commit is contained in:
Nikolay Krasko
2016-12-23 18:32:14 +03:00
parent 9ce74dd18c
commit 0c2247ca41
@@ -86,7 +86,7 @@ class GradleScriptTemplatesProvider(project: Project): ScriptTemplatesProvider {
class TopLevelSectionTokensEnumerator(script: CharSequence, identifier: String) : Enumeration<KotlinLexer> {
private val lexer = KotlinLexer().apply {
start(script)
start(script.replace(Regex.fromLiteral("\r"), ""))
var depth = 0
loop@ while (tokenType != null) {