capture

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 2022 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Capture

type Capture struct {
	// contains filtered or unexported fields
}

func New

func New(leXer Lexer, parser Parser, resolver Resolver) Capture

func (Capture) Resolve

func (c Capture) Resolve(
	capturesExpr types.CaptureExpressions,
	capturesCache types.CapturedStates,
	state types.NMState) (types.CapturedStates, error)

type CaptureEntry

type CaptureEntry struct {
	// contains filtered or unexported fields
}

func NewCaptureEntry

func NewCaptureEntry(capturedStates types.CapturedStates) (CaptureEntry, error)

func NewCaptureEntryWithLexerParserResolver

func NewCaptureEntryWithLexerParserResolver(capturedStates types.CapturedStates,
	l Lexer, p Parser, r Resolver) (CaptureEntry, error)

func (CaptureEntry) ResolveCaptureEntryPath

func (c CaptureEntry) ResolveCaptureEntryPath(
	captureEntryPathExpression string) (interface{}, error)

type Lexer

type Lexer interface {
	Lex(expression string) ([]lexer.Token, error)
}

type Parser

type Parser interface {
	Parse(string, []lexer.Token) (ast.Node, error)
}

type Resolver

type Resolver interface {
	Resolve(captureExpressions types.CaptureExpressions, captureASTPool types.CaptureASTPool,
		state types.NMState, capturedStates types.CapturedStates) (types.CapturedStates, error)
	ResolveCaptureEntryPath(expression string, captureEntryPathAST ast.Node, capturedStates types.CapturedStates) (interface{}, error)
}

Jump to

Keyboard shortcuts

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