- java.lang.Object
-
- swim.codec.Tag
-
public abstract class Tag extends Object implements Display, Debug
Description of a source location. Tags are used to annotate input sources, particularly fordiagnostic
purposes. AMark
tag annotates a source position. ASpan
tag annotate a source range.- See Also:
Diagnostic
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description abstract Mark
end()
Returns the last source position covered by thisTag
.abstract Tag
shift(Mark mark)
Returns the position of thisTag
relative to the givenmark
.abstract Mark
start()
Returns the first source position covered by thisTag
.abstract Tag
union(Tag other)
Returns aTag
that includes all source locations covered by both this tag, and someother
tag.
-
-
-
Method Detail
-
start
public abstract Mark start()
Returns the first source position covered by thisTag
.
-
end
public abstract Mark end()
Returns the last source position covered by thisTag
.
-
union
public abstract Tag union(Tag other)
Returns aTag
that includes all source locations covered by both this tag, and someother
tag.
-
-