Store file name in data key

This commit is contained in:
Clément Fournier
2021-08-08 14:29:20 +02:00
parent 54dc756207
commit 064c1d7aef
8 changed files with 31 additions and 15 deletions

View File

@ -80,12 +80,9 @@ class Foo {
}
})
fun String.parseScala(): ASTSource {
val ver = LanguageRegistry.getLanguage("Scala").defaultVersion.languageVersionHandler
val parser = ver.getParser(ver.defaultParserOptions)
fun String.parseScala(): ASTSource =
ScalaParsingHelper.DEFAULT.parse(this, ":dummy")
return parser.parse(":dummy:", StringReader(this)) as ASTSource
}
fun Node.assertBounds(bline: Int, bcol: Int, eline: Int, ecol: Int) {
this::getBeginLine shouldBe bline