ast

package
v0.0.4 Latest Latest
Warning

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

Go to latest
Published: Jul 1, 2021 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AclCidr

type AclCidr struct {
	Token    token.Token
	Inverse  *Boolean
	IP       *IP
	Mask     *Integer
	Comments Comments
}

func (*AclCidr) GetToken

func (c *AclCidr) GetToken() token.Token

func (*AclCidr) String

func (c *AclCidr) String() string

type AclDeclaration

type AclDeclaration struct {
	Token    token.Token
	Name     *Ident
	CIDRs    []*AclCidr
	Comments Comments
}

func (*AclDeclaration) GetComments

func (a *AclDeclaration) GetComments() string

func (*AclDeclaration) GetToken

func (a *AclDeclaration) GetToken() token.Token

func (*AclDeclaration) String

func (a *AclDeclaration) String() string

type AddStatement

type AddStatement struct {
	Token     token.Token
	Ident     *Ident
	Operator  *Operator
	Value     Expression
	NestLevel int
	Comments  Comments
}

func (*AddStatement) GetComments

func (a *AddStatement) GetComments() string

func (*AddStatement) GetToken

func (a *AddStatement) GetToken() token.Token

func (*AddStatement) String

func (a *AddStatement) String() string

type BackendDeclaration

type BackendDeclaration struct {
	Token      token.Token
	Name       *Ident
	Properties []*BackendProperty
	Comments   Comments
}

func (*BackendDeclaration) GetComments

func (b *BackendDeclaration) GetComments() string

func (*BackendDeclaration) GetToken

func (b *BackendDeclaration) GetToken() token.Token

func (*BackendDeclaration) String

func (b *BackendDeclaration) String() string

type BackendProbeObject

type BackendProbeObject struct {
	Token  token.Token
	Values []*BackendProperty
}

func (*BackendProbeObject) GetToken

func (o *BackendProbeObject) GetToken() token.Token

func (*BackendProbeObject) String

func (o *BackendProbeObject) String() string

type BackendProperty

type BackendProperty struct {
	Token    token.Token
	Key      *Ident
	Value    Expression
	Comments Comments
}

func (*BackendProperty) GetToken

func (p *BackendProperty) GetToken() token.Token

func (*BackendProperty) String

func (p *BackendProperty) String() string

type BlockStatement

type BlockStatement struct {
	Token      token.Token
	Statements []Statement
	NestLevel  int
	Comments   Comments
}

func (*BlockStatement) GetComments

func (b *BlockStatement) GetComments() string

func (*BlockStatement) GetToken

func (b *BlockStatement) GetToken() token.Token

func (*BlockStatement) String

func (b *BlockStatement) String() string

type Boolean

type Boolean struct {
	Token token.Token
	Value bool
}

func (*Boolean) GetToken

func (b *Boolean) GetToken() token.Token

func (*Boolean) String

func (b *Boolean) String() string

type CallStatement

type CallStatement struct {
	Token      token.Token
	Subroutine *Ident
	NestLevel  int
	Comments   Comments
}

func (*CallStatement) GetComments

func (c *CallStatement) GetComments() string

func (*CallStatement) GetToken

func (c *CallStatement) GetToken() token.Token

func (*CallStatement) String

func (c *CallStatement) String() string

type CommentStatement

type CommentStatement struct {
	Token     token.Token
	Value     string
	NestLevel int
}

func (*CommentStatement) GetComments

func (c *CommentStatement) GetComments() string

func (*CommentStatement) GetToken

func (c *CommentStatement) GetToken() token.Token

func (*CommentStatement) String

func (c *CommentStatement) String() string

type Comments

type Comments []*CommentStatement

func (*Comments) Annotations

func (c *Comments) Annotations() []string

func (Comments) String

func (c Comments) String() string

type DeclareStatement

type DeclareStatement struct {
	Token     token.Token
	Name      *Ident
	ValueType *Ident
	NestLevel int
	Comments  Comments
}

func (*DeclareStatement) GetComments

func (d *DeclareStatement) GetComments() string

func (*DeclareStatement) GetToken

func (d *DeclareStatement) GetToken() token.Token

func (*DeclareStatement) String

func (d *DeclareStatement) String() string

type DirectorBackendObject

type DirectorBackendObject struct {
	Token    token.Token
	Values   []*DirectorProperty
	Comments Comments
}

func (*DirectorBackendObject) GetToken

func (d *DirectorBackendObject) GetToken() token.Token

func (*DirectorBackendObject) String

func (d *DirectorBackendObject) String() string

type DirectorDeclaration

type DirectorDeclaration struct {
	Token        token.Token
	Name         *Ident
	DirectorType *Ident
	Properties   []Expression
	Comments     Comments
}

func (*DirectorDeclaration) GetComments

func (d *DirectorDeclaration) GetComments() string

func (*DirectorDeclaration) GetToken

func (d *DirectorDeclaration) GetToken() token.Token

func (*DirectorDeclaration) String

func (d *DirectorDeclaration) String() string

type DirectorProperty

type DirectorProperty struct {
	Token    token.Token
	Key      *Ident
	Value    Expression
	Comments Comments
}

func (*DirectorProperty) GetToken

func (d *DirectorProperty) GetToken() token.Token

func (*DirectorProperty) String

func (d *DirectorProperty) String() string

type ErrorStatement

type ErrorStatement struct {
	Token     token.Token
	Code      *Integer
	Argument  Expression
	NestLevel int
	Comments  Comments
}

func (*ErrorStatement) GetComments

func (e *ErrorStatement) GetComments() string

func (*ErrorStatement) GetToken

func (e *ErrorStatement) GetToken() token.Token

func (*ErrorStatement) String

func (e *ErrorStatement) String() string

type EsiStatement

type EsiStatement struct {
	Token     token.Token
	NestLevel int
	Comments  Comments
}

func (*EsiStatement) GetComments

func (e *EsiStatement) GetComments() string

func (*EsiStatement) GetToken

func (e *EsiStatement) GetToken() token.Token

func (*EsiStatement) String

func (e *EsiStatement) String() string

type Expression

type Expression interface {
	Node
	// contains filtered or unexported methods
}

type Float

type Float struct {
	Token token.Token
	Value float64
}

func (*Float) GetToken

func (f *Float) GetToken() token.Token

func (*Float) String

func (f *Float) String() string

type FunctionCallExpression

type FunctionCallExpression struct {
	Token     token.Token
	Function  Expression
	Arguments []Expression
}

func (*FunctionCallExpression) GetToken

func (f *FunctionCallExpression) GetToken() token.Token

func (*FunctionCallExpression) String

func (f *FunctionCallExpression) String() string

type GroupedExpression

type GroupedExpression struct {
	Token token.Token
	Right Expression
}

func (*GroupedExpression) GetToken

func (g *GroupedExpression) GetToken() token.Token

func (*GroupedExpression) String

func (g *GroupedExpression) String() string

type IP

type IP struct {
	Token token.Token
	Value string
}

func (*IP) GetToken

func (i *IP) GetToken() token.Token

func (*IP) String

func (i *IP) String() string

type Ident

type Ident struct {
	Token token.Token
	Value string
}

func (*Ident) GetToken

func (i *Ident) GetToken() token.Token

func (*Ident) String

func (i *Ident) String() string

type IfExpression

type IfExpression struct {
	Token       token.Token
	Condition   Expression
	Consequence Expression
	Alternative Expression
}

func (*IfExpression) GetToken

func (i *IfExpression) GetToken() token.Token

func (*IfExpression) String

func (i *IfExpression) String() string

type IfStatement

type IfStatement struct {
	Token               token.Token
	Condition           Expression
	Consequence         *BlockStatement
	Another             []*IfStatement
	Alternative         *BlockStatement
	NestLevel           int
	Comments            Comments
	AlternativeComments Comments
}

func (*IfStatement) GetComments

func (i *IfStatement) GetComments() string

func (*IfStatement) GetToken

func (i *IfStatement) GetToken() token.Token

func (*IfStatement) String

func (i *IfStatement) String() string

type ImportStatement

type ImportStatement struct {
	Token    token.Token
	Value    *Ident
	Comments Comments
}

func (*ImportStatement) GetComments

func (i *ImportStatement) GetComments() string

func (*ImportStatement) GetToken

func (i *ImportStatement) GetToken() token.Token

func (*ImportStatement) String

func (i *ImportStatement) String() string

type IncludeStatement

type IncludeStatement struct {
	Token    token.Token
	Module   *String
	Comments Comments
}

func (*IncludeStatement) GetComments

func (i *IncludeStatement) GetComments() string

func (*IncludeStatement) GetToken

func (i *IncludeStatement) GetToken() token.Token

func (*IncludeStatement) String

func (i *IncludeStatement) String() string

type InfixExpression

type InfixExpression struct {
	Token    token.Token
	Left     Expression
	Operator string
	Right    Expression
}

func (*InfixExpression) GetToken

func (i *InfixExpression) GetToken() token.Token

func (*InfixExpression) String

func (i *InfixExpression) String() string

type Integer

type Integer struct {
	Token token.Token
	Value int64
}

func (*Integer) GetToken

func (i *Integer) GetToken() token.Token

func (*Integer) String

func (i *Integer) String() string

type LogStatement

type LogStatement struct {
	Token     token.Token
	Value     Expression
	NestLevel int
	Comments  Comments
}

func (*LogStatement) GetComments

func (l *LogStatement) GetComments() string

func (*LogStatement) GetToken

func (l *LogStatement) GetToken() token.Token

func (*LogStatement) String

func (l *LogStatement) String() string

type Node

type Node interface {
	String() string
	GetToken() token.Token
}

type Operator

type Operator struct {
	Token    token.Token
	Operator string
}

func (*Operator) String

func (o *Operator) String() string

type PrefixExpression

type PrefixExpression struct {
	Token    token.Token
	Operator string
	Right    Expression
}

func (*PrefixExpression) GetToken

func (p *PrefixExpression) GetToken() token.Token

func (*PrefixExpression) String

func (p *PrefixExpression) String() string

type RTime

type RTime struct {
	Token    token.Token
	Value    string
	Duration time.Duration
}

func (*RTime) GetToken

func (r *RTime) GetToken() token.Token

func (*RTime) String

func (r *RTime) String() string

type RemoveStatement

type RemoveStatement struct {
	Token     token.Token
	Ident     *Ident
	NestLevel int
	Comments  Comments
}

func (*RemoveStatement) GetComments

func (r *RemoveStatement) GetComments() string

func (*RemoveStatement) GetToken

func (r *RemoveStatement) GetToken() token.Token

func (*RemoveStatement) String

func (r *RemoveStatement) String() string

type RestartStatement

type RestartStatement struct {
	Token     token.Token
	NestLevel int
	Comments  Comments
}

func (*RestartStatement) GetComments

func (r *RestartStatement) GetComments() string

func (*RestartStatement) GetToken

func (r *RestartStatement) GetToken() token.Token

func (*RestartStatement) String

func (r *RestartStatement) String() string

type ReturnStatement

type ReturnStatement struct {
	Token     token.Token
	Ident     *Ident
	NestLevel int
	Comments  Comments
}

func (*ReturnStatement) GetComments

func (r *ReturnStatement) GetComments() string

func (*ReturnStatement) GetToken

func (r *ReturnStatement) GetToken() token.Token

func (*ReturnStatement) String

func (r *ReturnStatement) String() string

type SetStatement

type SetStatement struct {
	Token     token.Token
	Ident     *Ident
	Operator  *Operator
	Value     Expression
	NestLevel int
	Comments  Comments
}

func (*SetStatement) GetComments

func (s *SetStatement) GetComments() string

func (*SetStatement) GetToken

func (s *SetStatement) GetToken() token.Token

func (*SetStatement) String

func (s *SetStatement) String() string

type Statement

type Statement interface {
	Node

	GetComments() string
	// contains filtered or unexported methods
}

type String

type String struct {
	Token token.Token
	Value string
}

func (*String) GetToken

func (s *String) GetToken() token.Token

func (*String) String

func (s *String) String() string

type SubroutineDeclaration

type SubroutineDeclaration struct {
	Token    token.Token
	Name     *Ident
	Block    *BlockStatement
	Comments Comments
}

func (*SubroutineDeclaration) GetComments

func (s *SubroutineDeclaration) GetComments() string

func (*SubroutineDeclaration) GetToken

func (s *SubroutineDeclaration) GetToken() token.Token

func (*SubroutineDeclaration) String

func (s *SubroutineDeclaration) String() string

type SyntheticBase64Statement

type SyntheticBase64Statement struct {
	Token     token.Token
	Value     Expression
	NestLevel int
	Comments  Comments
}

func (*SyntheticBase64Statement) GetComments

func (s *SyntheticBase64Statement) GetComments() string

func (*SyntheticBase64Statement) GetToken

func (s *SyntheticBase64Statement) GetToken() token.Token

func (*SyntheticBase64Statement) String

func (s *SyntheticBase64Statement) String() string

type SyntheticStatement

type SyntheticStatement struct {
	Token     token.Token
	Value     Expression
	NestLevel int
	Comments  Comments
}

func (*SyntheticStatement) GetComments

func (s *SyntheticStatement) GetComments() string

func (*SyntheticStatement) GetToken

func (s *SyntheticStatement) GetToken() token.Token

func (*SyntheticStatement) String

func (s *SyntheticStatement) String() string

type TableDeclaration

type TableDeclaration struct {
	Token      token.Token
	Name       *Ident
	ValueType  *Ident
	Properties []*TableProperty
	Comments   Comments
}

func (*TableDeclaration) GetComments

func (t *TableDeclaration) GetComments() string

func (*TableDeclaration) GetToken

func (t *TableDeclaration) GetToken() token.Token

func (*TableDeclaration) String

func (t *TableDeclaration) String() string

type TableProperty

type TableProperty struct {
	Token         token.Token
	Key           *String
	Value         Expression
	Comments      Comments
	AfterComments Comments
}

func (*TableProperty) String

func (t *TableProperty) String() string

type UnsetStatement

type UnsetStatement struct {
	Token     token.Token
	Ident     *Ident
	NestLevel int
	Comments  Comments
}

func (*UnsetStatement) GetComments

func (u *UnsetStatement) GetComments() string

func (*UnsetStatement) GetToken

func (u *UnsetStatement) GetToken() token.Token

func (*UnsetStatement) String

func (u *UnsetStatement) String() string

type VCL

type VCL struct {
	Statements []Statement
}

VCL is a root of program

func (*VCL) GetToken

func (v *VCL) GetToken() token.Token

func (*VCL) String

func (v *VCL) String() string

Jump to

Keyboard shortcuts

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