SourceLocation class

Contains information about source location where an error occurred

This class provides detailed location information for errors in RDF documents, similar to how compilers report errors with file, line, and column information. It helps pinpoint exactly where in a document a problem was detected.

The location uses 0-based line and column indices internally, but displays them as 1-based in string representations to match common editor conventions.

Constructors

SourceLocation({required int line, required int column, String? source, String? context})
Creates a new source location instance
const

Properties

column int
Column number (0-based) in the source where the error was detected
final
context String?
Optional context showing the problematic content
final
hashCode int
The hash code for this object.
no setterinherited
line int
Line number (0-based) in the source where the error was detected
final
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
source String?
Optional file path or URL where the error occurred
final

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
override

Operators

operator ==(Object other) bool
The equality operator.
inherited