parent
e74fdd3983
commit
e87385c6f2
|
@ -7,6 +7,8 @@ import std.string : cmp, format;
|
|||
import std.conv : to;
|
||||
import tlang.compiler.reporting : Coords;
|
||||
|
||||
// TODO: Below could have linof?!?!?!
|
||||
|
||||
/**
|
||||
* Defines a `Token` that a lexer
|
||||
* would be able to produce
|
||||
|
@ -117,4 +119,11 @@ public final class Token
|
|||
{
|
||||
return Coords(this.line, this.column);
|
||||
}
|
||||
|
||||
// TODO: Switch to this
|
||||
import tlang.compiler.reporting :LineInfo;
|
||||
public LineInfo deriveLineInfo()
|
||||
{
|
||||
return LineInfo(getOrigin(), getCoords());
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue