MessageRendering

class Object
trait Matchable
class Any

Value members

Concrete methods

def columnMarker(pos: SourcePosition, offset: Int, diagnosticLevel: String)(using Context): String

The column markers aligned under the error

The column markers aligned under the error

def errorMsg(pos: SourcePosition, msg: String, offset: Int)(using Context): String

The error message (msg) aligned under pos

The error message (msg) aligned under pos

Returns

aligned error message

Explanation rendered under "Explanation" header

Explanation rendered under "Explanation" header

def hl(diagnosticLevel: String)(str: String)(using Context): String
def messageAndPos(msg: Message, pos: SourcePosition, diagnosticLevel: String)(using Context): String

The whole message rendered from msg

The whole message rendered from msg

def outer(pos: SourcePosition, prefix: String)(using Context): List[String]

When inlining a method call, if there's an error we'd like to get the outer context and the pos at which the call was inlined.

When inlining a method call, if there's an error we'd like to get the outer context and the pos at which the call was inlined.

Returns

a list of strings with inline locations

def posStr(pos: SourcePosition, diagnosticLevel: String, message: Message)(using Context): String

The separator between errors containing the source file and error type

The separator between errors containing the source file and error type

Returns

separator containing error location and kind

def sourceLines(pos: SourcePosition, diagnosticLevel: String)(using Context): (List[String], List[String], Int)

Get the sourcelines before and after the position, as well as the offset for rendering line numbers

Get the sourcelines before and after the position, as well as the offset for rendering line numbers

Returns

(lines before error, lines after error, line numbers offset)

Remove ANSI coloring from str, useful for getting real length of strings

Remove ANSI coloring from str, useful for getting real length of strings

Returns

string stripped of ANSI escape codes