type text/template/parse.Pos
74 uses
text/template/parse (current package)
lex.go#L17: pos Pos // The starting position, in bytes, of this item in the input string.
lex.go#L106: trimMarkerLen = Pos(1 + 1) // marker plus space before or after
lex.go#L118: pos Pos // current position in the input
lex.go#L119: start Pos // start position of this item
lex.go#L143: l.pos += Pos(w)
lex.go#L161: l.pos -= Pos(w)
lex.go#L273: l.pos += Pos(x)
lex.go#L275: trimLength := Pos(0)
lex.go#L276: delimEnd := l.pos + Pos(len(l.leftDelim))
lex.go#L291: l.pos = Pos(len(l.input))
lex.go#L301: func rightTrimLength(s string) Pos {
lex.go#L302: return Pos(len(s) - len(strings.TrimRight(s, spaceChars)))
lex.go#L317: func leftTrimLength(s string) Pos {
lex.go#L318: return Pos(len(s) - len(strings.TrimLeft(s, spaceChars)))
lex.go#L324: l.pos += Pos(len(l.leftDelim))
lex.go#L326: afterMarker := Pos(0)
lex.go#L345: l.pos += Pos(len(leftComment))
lex.go#L350: l.pos += Pos(x + len(rightComment))
lex.go#L360: l.pos += Pos(len(l.rightDelim))
lex.go#L378: l.pos += Pos(len(l.rightDelim))
lex.go#L425: if l.pos < Pos(len(l.input)) {
node.go#L27: Position() Pos // byte position of start of node in full original input string
node.go#L40: type Pos int
node.go#L42: func (p Pos) Position() Pos {
node.go#L83: Pos
node.go#L88: func (t *Tree) newList(pos Pos) *ListNode {
node.go#L130: Pos
node.go#L135: func (t *Tree) newText(pos Pos, text string) *TextNode {
node.go#L158: Pos
node.go#L163: func (t *Tree) newComment(pos Pos, text string) *CommentNode {
node.go#L190: Pos
node.go#L198: func (t *Tree) newPipeline(pos Pos, line int, vars []*VariableNode) *PipeNode {
node.go#L263: Pos
node.go#L269: func (t *Tree) newAction(pos Pos, line int, pipe *PipeNode) *ActionNode {
node.go#L296: Pos
node.go#L301: func (t *Tree) newCommand(pos Pos) *CommandNode {
node.go#L348: Pos
node.go#L361: func (i *IdentifierNode) SetPos(pos Pos) *IdentifierNode {
node.go#L394: Pos
node.go#L399: func (t *Tree) newVariable(pos Pos, ident string) *VariableNode {
node.go#L429: Pos
node.go#L433: func (t *Tree) newDot(pos Pos) *DotNode {
node.go#L463: Pos
node.go#L467: func (t *Tree) newNil(pos Pos) *NilNode {
node.go#L499: Pos
node.go#L504: func (t *Tree) newField(pos Pos, ident string) *FieldNode {
node.go#L534: Pos
node.go#L540: func (t *Tree) newChain(pos Pos, node Node) *ChainNode {
node.go#L587: Pos
node.go#L592: func (t *Tree) newBool(pos Pos, true bool) *BoolNode {
node.go#L620: Pos
node.go#L633: func (t *Tree) newNumber(pos Pos, text string, typ itemType) (*NumberNode, error) {
node.go#L757: Pos
node.go#L763: func (t *Tree) newString(pos Pos, orig, text string) *StringNode {
node.go#L787: Pos
node.go#L791: func (t *Tree) newEnd(pos Pos) *endNode {
node.go#L814: Pos
node.go#L819: func (t *Tree) newElse(pos Pos, line int) *elseNode {
node.go#L846: Pos
node.go#L907: func (t *Tree) newIf(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *IfNode {
node.go#L919: Pos
node.go#L923: func (t *Tree) newBreak(pos Pos, line int) *BreakNode {
node.go#L936: Pos
node.go#L940: func (t *Tree) newContinue(pos Pos, line int) *ContinueNode {
node.go#L954: func (t *Tree) newRange(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *RangeNode {
node.go#L967: func (t *Tree) newWith(pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) *WithNode {
node.go#L978: Pos
node.go#L985: func (t *Tree) newTemplate(pos Pos, line int, name string, pipe *PipeNode) *TemplateNode {
parse.go#L426: func (t *Tree) breakControl(pos Pos, line int) Node {
parse.go#L441: func (t *Tree) continueControl(pos Pos, line int) Node {
parse.go#L524: func (t *Tree) parseControl(context string) (pos Pos, line int, pipe *PipeNode, list, elseList *ListNode) {
parse.go#L822: func (t *Tree) useVar(pos Pos, name string) Node {
html/template
escape.go#L414: func newIdentCmd(identifier string, pos parse.Pos) *parse.CommandNode {