Documentation
¶
Overview ¶
Package token defines source positions for the TypeScript AST.
Synthesized nodes carry NoPos, so a tree may mix parsed and generated subtrees freely.
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var NoSpan = Span{}
NoSpan is the span of a synthesized node.
Functions ¶
This section is empty.
Types ¶
type File ¶
File maps byte offsets to line and column pairs. It is safe for concurrent reads once built.
type Location ¶
Location is a human-readable source position. Line and Column are 1-based, and Column counts bytes.
type Pos ¶
type Pos int
Pos is a 1-based byte offset into a source file, so that the zero value can mean "synthesized".
const NoPos Pos = 0
NoPos is the zero Pos, reported by every synthesized node.
Click to show internal directories.
Click to hide internal directories.