Fix some overqualifications due to IDE renaming.

This commit is contained in:
2023-09-04 02:38:09 -07:00
parent 3545aa076f
commit 4aa516f0fb
5 changed files with 11 additions and 5 deletions

View File

@ -1,12 +1,13 @@
package gay.pizza.pork.frontend
import gay.pizza.pork.parser.CharSource
import gay.pizza.pork.parser.StringCharSource
import java.nio.file.Path
import kotlin.io.path.absolutePathString
import kotlin.io.path.readText
class FsContentSource(val root: Path) : ContentSource {
override fun loadAsCharSource(path: String): gay.pizza.pork.parser.CharSource =
override fun loadAsCharSource(path: String): CharSource =
StringCharSource(asFsPath(path).readText())
override fun stableContentIdentity(path: String): String =

View File

@ -2,6 +2,7 @@ package gay.pizza.pork.frontend
import gay.pizza.pork.ast.CompilationUnit
import gay.pizza.pork.ast.ImportDeclaration
import gay.pizza.pork.parser.DiscardNodeAttribution
import gay.pizza.pork.parser.Parser
import gay.pizza.pork.parser.TokenStreamSource
import gay.pizza.pork.parser.Tokenizer
@ -18,7 +19,7 @@ class World(val contentSource: ContentSource) {
val charSource = contentSource.loadAsCharSource(path)
val tokenizer = Tokenizer(charSource)
val tokenStream = tokenizer.tokenize()
val parser = Parser(TokenStreamSource(tokenStream), gay.pizza.pork.parser.DiscardNodeAttribution)
val parser = Parser(TokenStreamSource(tokenStream), DiscardNodeAttribution)
return parser.readCompilationUnit()
}