cpp

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Sep 3, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Transpile

func Transpile(src string) (string, error)

Types

type Arg

type Arg struct {
	Name    string
	Value   Expr
	Missing bool
}

type AssignStmt

type AssignStmt struct {
	Name, Op string
	Value    Expr
}

type BinaryExpr

type BinaryExpr struct {
	Op   string
	L, R Expr
}

type BlockStmt

type BlockStmt struct{ List []Stmt }

type BreakStmt

type BreakStmt struct{}

type CallExpr

type CallExpr struct {
	Fun  Expr
	Args []Arg
}

type Expr

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

type ExprStmt

type ExprStmt struct{ X Expr }

type ForStmt

type ForStmt struct {
	Name string
	Seq  Expr
	Body Stmt
}

type FunctionExpr

type FunctionExpr struct {
	Params []Param
	Body   *BlockStmt
}

type IdentExpr

type IdentExpr struct{ Name string }

type IfStmt

type IfStmt struct {
	Cond Expr
	Then Stmt
	Else Stmt
}

type IndexExpr

type IndexExpr struct {
	X      Expr
	Args   []Arg
	Double bool
}

type LiteralExpr

type LiteralExpr struct{ Kind, Text string }

type NextStmt

type NextStmt struct{}

type Param

type Param struct {
	Name    string
	Default Expr
}

type RepeatStmt

type RepeatStmt struct{ Body Stmt }

type ReturnStmt

type ReturnStmt struct{ X Expr }

type Stmt

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

type UnaryExpr

type UnaryExpr struct {
	Op string
	X  Expr
}

type WhileStmt

type WhileStmt struct {
	Cond Expr
	Body Stmt
}

Jump to

Keyboard shortcuts

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