Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type LetterKindSpan ¶
LetterKindSpan is one candidate-kind letter inside a `::?<letters>` marker — the letter's position and the NodeType it represents.
type LogicalLine ¶
type LogicalLine struct {
Text string // merged content (continuations joined with space)
RawStart int // byte offset in original input where this logical line group begins
M2R []int // merged-index → raw-index mapping (len == len(Text))
LineNo int // 1-based first physical line number
}
LogicalLine is a single logical line after continuation merging.
type NodeSpec ¶
type NodeSpec struct {
Name string
Alias string
Type model.NodeType
// Candidates lists the possible kinds of an Unresolved node (from a ::?et /
// ::?etc marker), primary first. Non-empty iff Type == Unresolved.
Candidates []model.NodeType
Tooltip string
// Span is [start, end) within the logical line where the name was found.
NameStart int
NameEnd int
// Lexeme spans within the logical line ([start,end), {-1,-1} if absent).
// Filled by parseNodeSpecs from the pt-relative spans parseOneNodeSpec
// records; consumed by the parser to populate model.Src.Lex.
KindMarker [2]int // ::e / ::t / ::c
AliasMark [2]int // ::a
TipMark [2]int // ::tip
AliasName [2]int // the alias identifier (as written)
TipString [2]int // the quoted tooltip string (incl. quotes)
NameQuoted bool // the title (Name span) is a quoted string
// For ::?<letters> markers, the `::?` prefix span (rendered as a generic
// type-marker) plus a per-letter list so each candidate letter colors as
// its own kind (e=event, t=thing, c=concept). Empty when Type !=
// Unresolved; KindMarker is noSpan in that case.
UndecidedPrefix [2]int
UndecidedLetters []LetterKindSpan
}
NodeSpec is the result of parsing a single node annotation.
type Options ¶
type Options struct {
Filename string
}
Options holds optional settings for the parser.
type ParseError ¶
ParseError reports a parsing error with a message and a span in raw source offsets [start, end).
func (*ParseError) Error ¶
func (e *ParseError) Error() string
type Token ¶
type Token struct {
Kind TokenKind
Start int // offset within LogicalLine.Text (inclusive)
End int // exclusive offset
Text string // raw token text for debugging / node segments
// Arrow-specific:
Tooltip string // unescaped tooltip text (TokArrowTooltip)
ExpCode byte // 'P','X','L','N' (TokArrowExpl)
Reverse bool // parsed from <-- form
Undir bool // tooltip/explicit ending with -- (undirected)
}
Token is a single token from scanning a logical line.
Click to show internal directories.
Click to hide internal directories.