statements

package
v1.3.7-beta6 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2024 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MiddleSwitch   = "switch"
	MiddleTryStart = "tryStart"
)

Variables

This section is empty.

Functions

func StatementsString

func StatementsString(statements []Statement, funcCtx *class_context.ClassContext) string

Types

type AssignStatement

type AssignStatement struct {
	LeftValue   values.JavaValue
	ArrayMember *values.JavaArrayMember
	JavaValue   values.JavaValue
	IsFirst     bool
}

func NewArrayMemberAssignStatement

func NewArrayMemberAssignStatement(m *values.JavaArrayMember, value values.JavaValue) *AssignStatement

func NewAssignStatement

func NewAssignStatement(leftVal, value values.JavaValue, isFirst bool) *AssignStatement

func (*AssignStatement) String

func (a *AssignStatement) String(funcCtx *class_context.ClassContext) string

type CaseItem

type CaseItem struct {
	IsDefault bool
	IntValue  int
	Body      []Statement
}

func NewCaseItem

func NewCaseItem(v int, body []Statement) *CaseItem

type ConditionStatement

type ConditionStatement struct {
	Condition values.JavaValue
	Op        string
}

func NewConditionStatement

func NewConditionStatement(cmp values.JavaValue, op string) *ConditionStatement

func (*ConditionStatement) String

type CustomStatement

type CustomStatement struct {
	Name       string
	Info       any
	StringFunc func(funcCtx *class_context.ClassContext) string
}

func NewCustomStatement

func NewCustomStatement(stringFun func(funcCtx *class_context.ClassContext) string) *CustomStatement

func (*CustomStatement) String

func (v *CustomStatement) String(funcCtx *class_context.ClassContext) string

type DeclareStatement

type DeclareStatement struct {
	Id       int
	JavaType types.JavaType
}

func NewDeclareStatement

func NewDeclareStatement(id int, typ types.JavaType) *DeclareStatement

func (*DeclareStatement) String

func (a *DeclareStatement) String(funcCtx *class_context.ClassContext) string

type DoWhileStatement

type DoWhileStatement struct {
	Label          string
	ConditionValue values.JavaValue
	Body           []Statement
}

func NewDoWhileStatement

func NewDoWhileStatement(condition values.JavaValue, body []Statement) *DoWhileStatement

func (*DoWhileStatement) String

func (w *DoWhileStatement) String(funcCtx *class_context.ClassContext) string

type ExpressionStatement

type ExpressionStatement struct {
	Expression values.JavaValue
}

func NewExpressionStatement

func NewExpressionStatement(v values.JavaValue) *ExpressionStatement

func (*ExpressionStatement) String

type ForStatement

type ForStatement struct {
	InitVar             Statement
	Condition           *ConditionStatement
	EndExp              Statement
	SubStatements       []Statement
	SubStatementsDumper func(subStatement Statement) string
}

func NewForStatement

func NewForStatement(subStatements []Statement) *ForStatement

func (*ForStatement) String

func (f *ForStatement) String(funcCtx *class_context.ClassContext) string

type GOTOStatement

type GOTOStatement struct {
	ToStatement int
}

func NewGOTOStatement

func NewGOTOStatement() *GOTOStatement

func (*GOTOStatement) String

func (g *GOTOStatement) String(funcCtx *class_context.ClassContext) string

type IfStatement

type IfStatement struct {
	Condition values.JavaValue
	IfBody    []Statement
	ElseBody  []Statement
}

func NewIfStatement

func NewIfStatement(condition values.JavaValue, ifBody, elseBody []Statement) *IfStatement

func (*IfStatement) String

func (g *IfStatement) String(funcCtx *class_context.ClassContext) string

type MiddleStatement

type MiddleStatement struct {
	Data any
	Flag string
}

func NewMiddleStatement

func NewMiddleStatement(flag string, d any) *MiddleStatement

func (*MiddleStatement) String

func (a *MiddleStatement) String(funcCtx *class_context.ClassContext) string

type NewStatement

type NewStatement struct {
	Class *types.JavaClass
}

func NewNewStatement

func NewNewStatement(class *types.JavaClass) *NewStatement

func (*NewStatement) String

func (a *NewStatement) String(funcCtx *class_context.ClassContext) string

type ReturnStatement

type ReturnStatement struct {
	JavaValue values.JavaValue
}

func NewReturnStatement

func NewReturnStatement(value values.JavaValue) *ReturnStatement

func (*ReturnStatement) String

func (r *ReturnStatement) String(funcCtx *class_context.ClassContext) string

type StackAssignStatement

type StackAssignStatement struct {
	Id        int
	JavaValue *values.JavaRef
}

func NewStackAssignStatement

func NewStackAssignStatement(id int, value *values.JavaRef) *StackAssignStatement

func (*StackAssignStatement) String

type Statement

type Statement interface {
	String(funcCtx *class_context.ClassContext) string
}

type SwitchStatement

type SwitchStatement struct {
	Value values.JavaValue
	Cases []*CaseItem
}

func NewSwitchStatement

func NewSwitchStatement(value values.JavaValue, cases []*CaseItem) *SwitchStatement

func (*SwitchStatement) String

func (a *SwitchStatement) String(funcCtx *class_context.ClassContext) string

type SynchronizedStatement

type SynchronizedStatement struct {
	Argument values.JavaValue
	Body     []Statement
}

func NewSynchronizedStatement

func NewSynchronizedStatement(val values.JavaValue, body []Statement) *SynchronizedStatement

func (*SynchronizedStatement) String

type TryCatchStatement

type TryCatchStatement struct {
	Exception   []*values.JavaRef
	TryBody     []Statement
	CatchBodies [][]Statement
}

func NewTryCatchStatement

func NewTryCatchStatement(body1 []Statement, body2 [][]Statement) *TryCatchStatement

func (*TryCatchStatement) String

func (w *TryCatchStatement) String(funcCtx *class_context.ClassContext) string

type WhileStatement

type WhileStatement struct {
	ConditionValue values.JavaValue
	Body           []Statement
}

func NewWhileStatement

func NewWhileStatement(condition values.JavaValue, body []Statement) *WhileStatement

func (*WhileStatement) String

func (w *WhileStatement) String(funcCtx *class_context.ClassContext) string

Jump to

Keyboard shortcuts

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