ast

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: May 14, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Attrib

type Attrib interface{}

type IdStmt

type IdStmt string

func NewIdStmt

func NewIdStmt(s Attrib) (is IdStmt)

func (IdStmt) Equals

func (this IdStmt) Equals(that Stmt) bool

func (IdStmt) MatchId

func (this IdStmt) MatchId(s string) bool

func (IdStmt) MatchIf

func (this IdStmt) MatchIf(cnd string, s Stmt) bool

func (IdStmt) MatchIfElse

func (this IdStmt) MatchIfElse(cnd string, s1, s2 Stmt) bool

func (IdStmt) String

func (this IdStmt) String() string

type If

type If struct {
	C string
	S Stmt
}

func NewIf

func NewIf(cnd, stmt Attrib) (ifs *If)

func (*If) Equals

func (this *If) Equals(that Stmt) bool

func (*If) MatchId

func (this *If) MatchId(s string) bool

func (*If) MatchIf

func (this *If) MatchIf(cnd string, s Stmt) bool

func (*If) MatchIfElse

func (this *If) MatchIfElse(cnd string, s1, s2 Stmt) bool

func (*If) String

func (this *If) String() string

type IfElse

type IfElse struct {
	C      string
	S1, S2 Stmt
}

func NewIfElse

func NewIfElse(cnd, stmt1, stmt2 Attrib) (ies *IfElse)

func (*IfElse) Equals

func (this *IfElse) Equals(that Stmt) bool

func (*IfElse) MatchId

func (this *IfElse) MatchId(s string) bool

func (*IfElse) MatchIf

func (this *IfElse) MatchIf(cnd string, s Stmt) bool

func (*IfElse) MatchIfElse

func (this *IfElse) MatchIfElse(cnd string, s1, s2 Stmt) bool

func (*IfElse) String

func (this *IfElse) String() string

type Stmt

type Stmt interface {
	Equals(Stmt) bool
	MatchIf(cnd string, s Stmt) bool
	MatchIfElse(cnd string, s1, s2 Stmt) bool
	MatchId(s string) bool
	String() string
}

Jump to

Keyboard shortcuts

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