reslocparser

package
v1.3.9 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseFilePos

func ParseFilePos(src []byte, index int) (*parseutil.FilePos, error)

util func to replace parseutil.*

func ResLocToFilePos

func ResLocToFilePos(rl *ResLoc) *parseutil.FilePos

Types

type MFn

type MFn = pscan.MFn

type ResLoc

type ResLoc struct {
	Path string // raw path

	Line   int // 0 is nil
	Column int // 0 is nil
	Offset int // -1 is nil

	PathSep rune
	Escape  rune

	Scheme string // ex: "file://", useful to know when to translate to another path separator
	Volume string

	Pos, End int // contains reverse expansion
}

func NewResLoc added in v1.3.8

func NewResLoc() *ResLoc

func ParseResLoc

func ParseResLoc(src []byte, index int) (*ResLoc, error)

func ParseResLoc2

func ParseResLoc2(rd iorw.ReaderAt, index int) (*ResLoc, error)

func (*ResLoc) ClearFilename1

func (rl *ResLoc) ClearFilename1() string

func (*ResLoc) Stringify1

func (rl *ResLoc) Stringify1() string

func (*ResLoc) ToLinecolString added in v1.3.8

func (rl *ResLoc) ToLinecolString() string

func (*ResLoc) ToOffsetString added in v1.3.8

func (rl *ResLoc) ToOffsetString() string

type ResLocParser

type ResLocParser struct {
	Escape        rune
	PathSeparator rune
	ParseVolume   bool
	// contains filtered or unexported fields
}

func NewResLocParser

func NewResLocParser() *ResLocParser

func (*ResLocParser) Init

func (p *ResLocParser) Init()

func (*ResLocParser) Parse

func (p *ResLocParser) Parse(src []byte, index int) (*ResLoc, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL