mirror of
https://github.com/irmen/prog8.git
synced 2025-01-26 19:30:59 +00:00
fix merge conflict
This commit is contained in:
parent
f37fb82d53
commit
f4b3d19059
@ -12,13 +12,6 @@ import prog8.parser.Prog8ANTLRParser
|
||||
|
||||
private data class NumericLiteral(val number: Number, val datatype: DataType)
|
||||
|
||||
// TODO [merge conflict]: not sure if this should be kept?? Is it double??
|
||||
internal fun Prog8ANTLRParser.ModuleContext.toAst(name: String, source: Path, encoding: IStringEncoding) : Module {
|
||||
val nameWithoutSuffix = if(name.endsWith(".p8")) name.substringBeforeLast('.') else name
|
||||
val directives = this.directive().map { it.toAst() }
|
||||
val blocks = this.block().map { it.toAst(Module.isLibrary(source), encoding) }
|
||||
return Module(nameWithoutSuffix, (directives + blocks).toMutableList(), toPosition(), source)
|
||||
}
|
||||
|
||||
private fun ParserRuleContext.toPosition() : Position {
|
||||
/*
|
||||
|
Loading…
x
Reference in New Issue
Block a user