statement

package
v0.6.3 Latest Latest
Warning

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

Go to latest
Published: Jul 31, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Assign

type Assign struct {
	LHS      []ast.Expression
	RHS      []ast.Expression
	Token    token.Token
	TokenPos core.Pos
}

Assign represents an assignment statement.

func (*Assign) End

func (s *Assign) End() core.Pos

End returns the position of first character immediately after the node.

func (*Assign) Pos

func (s *Assign) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Assign) StatementNode

func (s *Assign) StatementNode()

func (*Assign) String

func (s *Assign) String() string

type Block

type Block struct {
	Stmts  []ast.Statement
	LBrace core.Pos
	RBrace core.Pos
}

Block represents a block statement.

func (*Block) End

func (s *Block) End() core.Pos

End returns the position of first character immediately after the node.

func (*Block) Pos

func (s *Block) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Block) StatementNode

func (s *Block) StatementNode()

func (*Block) String

func (s *Block) String() string

type Branch

type Branch struct {
	Token    token.Token
	TokenPos core.Pos
	Label    ast.Identifier
}

Branch represents a branch statement.

func (*Branch) End

func (s *Branch) End() core.Pos

End returns the position of first character immediately after the node.

func (*Branch) Pos

func (s *Branch) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Branch) StatementNode

func (s *Branch) StatementNode()

func (*Branch) String

func (s *Branch) String() string

type Defer

type Defer struct {
	DeferPos core.Pos
	Call     ast.Expression
}

Defer represents a defer statement.

func (*Defer) End

func (s *Defer) End() core.Pos

func (*Defer) Pos

func (s *Defer) Pos() core.Pos

func (*Defer) StatementNode

func (s *Defer) StatementNode()

func (*Defer) String

func (s *Defer) String() string

type Empty

type Empty struct {
	Semicolon core.Pos
	Implicit  bool
}

Empty represents an empty statement.

func (*Empty) End

func (s *Empty) End() core.Pos

End returns the position of first character immediately after the node.

func (*Empty) Pos

func (s *Empty) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Empty) StatementNode

func (s *Empty) StatementNode()

func (*Empty) String

func (s *Empty) String() string

type Export

type Export struct {
	ExportPos core.Pos
	Result    ast.Expression
}

Export represents an export statement.

func (*Export) End

func (s *Export) End() core.Pos

End returns the position of first character immediately after the node.

func (*Export) Pos

func (s *Export) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Export) StatementNode

func (s *Export) StatementNode()

func (*Export) String

func (s *Export) String() string

type Expression

type Expression struct {
	Expr ast.Expression
}

Expression represents an expression statement.

func (*Expression) End

func (s *Expression) End() core.Pos

End returns the position of first character immediately after the node.

func (*Expression) Pos

func (s *Expression) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Expression) StatementNode

func (s *Expression) StatementNode()

func (*Expression) String

func (s *Expression) String() string

type For

type For struct {
	ForPos core.Pos
	Init   ast.Statement
	Cond   ast.Expression
	Post   ast.Statement
	Body   *Block
}

For represents a for statement.

func (*For) End

func (s *For) End() core.Pos

End returns the position of first character immediately after the node.

func (*For) Pos

func (s *For) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*For) StatementNode

func (s *For) StatementNode()

func (*For) String

func (s *For) String() string

type ForIn

type ForIn struct {
	ForPos   core.Pos
	Key      ast.Identifier
	Value    ast.Identifier
	Iterable ast.Expression
	Body     *Block
}

ForIn represents a for-in statement.

func (*ForIn) End

func (s *ForIn) End() core.Pos

End returns the position of first character immediately after the node.

func (*ForIn) Pos

func (s *ForIn) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*ForIn) StatementNode

func (s *ForIn) StatementNode()

func (*ForIn) String

func (s *ForIn) String() string

type If

type If struct {
	IfPos core.Pos
	Init  ast.Statement
	Cond  ast.Expression
	Body  *Block
	Else  ast.Statement // else branch; or nil
}

If represents an if statement.

func (*If) End

func (s *If) End() core.Pos

End returns the position of first character immediately after the node.

func (*If) Pos

func (s *If) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*If) StatementNode

func (s *If) StatementNode()

func (*If) String

func (s *If) String() string

type IncDec

type IncDec struct {
	Expr     ast.Expression
	Token    token.Token
	TokenPos core.Pos
}

IncDec represents increment or decrement statement.

func (*IncDec) End

func (s *IncDec) End() core.Pos

End returns the position of first character immediately after the node.

func (*IncDec) Pos

func (s *IncDec) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*IncDec) StatementNode

func (s *IncDec) StatementNode()

func (*IncDec) String

func (s *IncDec) String() string

type Invalid

type Invalid struct {
	From core.Pos
	To   core.Pos
}

Invalid represents invalid statement.

func (*Invalid) End

func (s *Invalid) End() core.Pos

End returns the position of first character immediately after the node.

func (*Invalid) Pos

func (s *Invalid) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Invalid) StatementNode

func (s *Invalid) StatementNode()

func (*Invalid) String

func (s *Invalid) String() string

type Return

type Return struct {
	ReturnPos core.Pos
	Result    ast.Expression
}

Return represents a return statement.

func (*Return) End

func (s *Return) End() core.Pos

End returns the position of first character immediately after the node.

func (*Return) Pos

func (s *Return) Pos() core.Pos

Pos returns the position of first character belonging to the node.

func (*Return) StatementNode

func (s *Return) StatementNode()

func (*Return) String

func (s *Return) String() string

Jump to

Keyboard shortcuts

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