// Position returns the current position of the parser in the input stream.
761901
func (p *parser) Position() Position {
	// if we have any previously read tokens, then the token at
	// the end of the "undo" list (most recently "undone") gives the
	// position of the parser
	_length := len(p._undo)
	if _length != 0 {
		return p._undo[_length-1].Position
	}

	// otherwise, return the position of the lexer
	return p._lexer.Position()
}
580597
func (c *Conn) MasterPosition() (Position, error) {
	gtidSet, err := c.flavor.masterGTIDSet(c)
	if err != nil {
		return Position{}, err
	}
	return Position{
		GTIDSet: gtidSet,
	}, nil
}
312980
func (s *GetUsagePlansInput) SetPosition(v string) *GetUsagePlansInput {
	s.Position = &v
	return s
}
329456
func (w *Lucene41PostingsWriter) AddPosition(position int,
	payload []byte, startOffset, endOffset int) error {

	w.posDeltaBuffer[w.posBufferUpto] = position - w.lastPosition
	if w.fieldHasPayloads {
		if len(payload) == 0 {
			// no paylaod
			w.payloadLengthBuffer[w.posBufferUpto] = 0
		} else {
			panic("not implemented yet")
		}
	}

	if w.fieldHasOffsets {
		panic("not implemented yet")
	}

	w.posBufferUpto++
	w.lastPosition = position
	if w.posBufferUpto == LUCENE41_BLOCK_SIZE {
		var err error
		if err = w.forUtil.writeBlock(w.posDeltaBuffer, w.encoded, w.posOut); err != nil {
			return err
		}

		if w.fieldHasPayloads {
			panic("niy")
		}
		if w.fieldHasOffsets {
			panic("niy")
		}
		w.posBufferUpto = 0
	}
	return nil
}
484181
func (s *GetDeploymentsInput) SetPosition(v string) *GetDeploymentsInput {
	s.Position = &v
	return s
}
19166
func (t *Tree) GetPosition(key string) Position {
	if key == "" {
		return t.position
	}
	return t.GetPositionPath(strings.Split(key, "."))
}
767353
func (c Command) Position(param ParameterInterface) int {
	for index, item := range c.Parameters() {
		if item.Equals(param) {
			return index
		}
	}

	return -1
}
1359916
func parse(xlog xlog.Position) (res [2]int, err error) {
	parts := strings.SplitN(string(xlog), "/", 2)
	if len(parts) != 2 {
		err = fmt.Errorf("malformed xlog position %q", xlog)
		return
	}

	res[0], err = parseHex(parts[0])
	if err != nil {
		return
	}
	res[1], err = parseHex(parts[1])

	return
}
616151
func HandlePosition(pos vm.Position, gens ...CodeGenerator) (err error) {
	defer func() {
		if r := recover(); r != nil {
			err = errors.New(fmt.Sprintf("%s", r))
		}
	}()
	for _, s := range gens {
		cp := s.GetPosition()
		cs := cp.State
		ns := pos.State

		if ns.ToolIndex != cs.ToolIndex {
			s.ToolChange(ns.ToolIndex)
		}

		if ns.NextToolIndex != cs.NextToolIndex {
			s.ToolChangeSuggestion(ns.NextToolIndex)
		}

		if ns.ToolLengthIndex != cs.ToolLengthIndex {
			s.ToolLengthChange(ns.ToolLengthIndex)
		}

		if ns.SpindleEnabled != cs.SpindleEnabled ||
			ns.SpindleClockwise != cs.SpindleClockwise ||
			ns.SpindleSpeed != cs.SpindleSpeed {
			s.Spindle(ns.SpindleEnabled, ns.SpindleClockwise, ns.SpindleSpeed)
		}

		if ns.FloodCoolant != cs.FloodCoolant || ns.MistCoolant != cs.MistCoolant {
			s.Coolant(ns.FloodCoolant, ns.MistCoolant)
		}

		if ns.FeedMode != cs.FeedMode {
			s.FeedMode(ns.FeedMode)
		}

		if ns.Feedrate != cs.Feedrate {
			s.Feedrate(ns.Feedrate)
		}

		if ns.CutterCompensation != cs.CutterCompensation {
			s.CutterCompensation(ns.CutterCompensation)
		}

		if ns.MoveMode == vm.MoveModeDwell {
			s.Dwell(ns.DwellTime)
		} else if cp.X != pos.X || cp.Y != pos.Y || cp.Z != pos.Z || cs.MoveMode != ns.MoveMode {
			s.Move(pos.X, pos.Y, pos.Z, ns.MoveMode)
		}
		s.SetPosition(pos)
	}
	return nil
}
995589
func Position(row, col uint) ANSI {
	return newAnsi(fmt.Sprintf(esc+"%d;%dH", row, col))
}
620052
func (s *Scanner) pos() ast.Position {
	return ast.Position{Line: s.line + 1, Column: s.offset - s.lineHead + 1}
}
118382
func (s *GetAuthorizersInput) SetPosition(v string) *GetAuthorizersInput {
	s.Position = &v
	return s
}
1309866
func (s *GetClientCertificatesOutput) SetPosition(v string) *GetClientCertificatesOutput {
	s.Position = &v
	return s
}
1361686
func (s *GetVpcLinksOutput) SetPosition(v string) *GetVpcLinksOutput {
	s.Position = &v
	return s
}
498483
func (c *Cursor) Next() *Position {
	n := c.curr.cmp(&c.end)
	if n == 0 {
		if c.pi == len(c.ps)-1 {
			return nil
		}
		c.pi++
		c.curr = ipToIPv6Int(c.ps[c.pi].IP.To16())
		c.start = c.curr
		if c.ps[c.pi].IP.To4() != nil {
			c.end = c.ps[c.pi].lastIPv4MappedIPv6Int()
		}
		if c.ps[c.pi].IP.To16() != nil && c.ps[c.pi].IP.To4() == nil {
			c.end = c.ps[c.pi].lastIPv6Int()
		}
	} else {
		c.curr.incr()
	}
	return c.Pos()
}
1001816
func (c *Cursor) Pos() *Position {
	return &Position{IP: c.curr.ip(), Prefix: c.ps[c.pi]}
}
147110
func (window *Window) GetPosition() (x, y int32) {
	var _x, _y C.int
	C.SDL_GetWindowPosition(window.cptr(), &_x, &_y)
	return int32(_x), int32(_y)
}