regex

package
v0.0.0-...-6b9a7a9 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2020 License: MIT Imports: 1 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: MIT

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WalkRegex

func WalkRegex(v Visitor, node Stmt)

Types

type AltExpr

type AltExpr struct {
	List []Stmt
}

Alternation

func (*AltExpr) AppendStmt

func (e *AltExpr) AppendStmt(s Stmt)

type CallStmt

type CallStmt struct {
	Node *ast.CallExpr
}

func NewCallStmt

func NewCallStmt(n *ast.CallExpr) (s *CallStmt)

type CloseStmt

type CloseStmt struct {
	Node *ast.CallExpr
}

func NewCloseStmt

func NewCloseStmt(n *ast.CallExpr) (s *CloseStmt)

type ConcatExpr

type ConcatExpr struct {
	List []Stmt
}

Concatenation

func (*ConcatExpr) AppendStmt

func (e *ConcatExpr) AppendStmt(s Stmt)

type EpsStmt

type EpsStmt struct {
}

func NewEpsStmt

func NewEpsStmt() *EpsStmt

type ExprStmt

type ExprStmt interface {
	Stmt

	AppendStmt(s Stmt)
	// contains filtered or unexported methods
}

type Fork

type Fork struct {
	Smnt *ast.GoStmt
	Func *Func
}

func NewFork

func NewFork(s *ast.GoStmt, fun *Func) (f *Fork)

type Func

type Func struct {
	FuncDecl *ast.FuncDecl // FuncDecl of function or nil
	Regex    ExprStmt
}

func NewFunc

func NewFunc(fd *ast.FuncDecl) (f *Func)

type RcvStmt

type RcvStmt struct {
	Node *ast.UnaryExpr
}

func NewRcvStmt

func NewRcvStmt(n *ast.UnaryExpr) (s *RcvStmt)

type Root

type Root struct {
	File     *ast.File
	Main     *Func
	ForkList []*Fork
	FuncList []*Func
}

func NewRoot

func NewRoot(f *ast.File) (r *Root)

func (*Root) AppendFork

func (r *Root) AppendFork(f *Fork)

func (*Root) AppendFunc

func (r *Root) AppendFunc(f *Func)

func (*Root) SetMain

func (r *Root) SetMain(m *Func)

type SndStmt

type SndStmt struct {
	Node *ast.SendStmt
}

func NewSndStmt

func NewSndStmt(n *ast.SendStmt) (s *SndStmt)

type StarExpr

type StarExpr struct {
	Node Stmt
}

Kleene star

func (*StarExpr) AppendStmt

func (e *StarExpr) AppendStmt(s Stmt)

type Stmt

type Stmt interface {
	// contains filtered or unexported methods
}

type Visitor

type Visitor interface {
	Visit(node Stmt) (w Visitor)
}

Jump to

Keyboard shortcuts

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