togo

package
v0.0.0-...-78e98ac Latest Latest
Warning

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

Go to latest
Published: Mar 23, 2021 License: BSD-3-Clause Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func File

func File(name string, nodes ...goast.Node) *goast.File

File returns a new file

func PHPEval

func PHPEval(p phpast.Node) goast.Expr

PHPEval returns a PHPEval

func PHPEvalStmt

func PHPEvalStmt(p phpast.Node) goast.Stmt

PHPEvalStmt returns a PHPEvalStmt

func TranspileFile

func TranspileFile(goFilename, phpFilename, phpStr string, gosrc io.Writer) error

TranspileFile transpiles a file

Types

type Togo

type Togo struct {
	// contains filtered or unexported fields
}

Togo is a go php transpiler

func (*Togo) CtxFuncCall

func (t *Togo) CtxFuncCall(funcName string, args []goast.Expr) *goast.CallExpr

func (*Togo) ResolveDynamicProperty

func (t *Togo) ResolveDynamicProperty(rcvr goast.Expr, propName phpast.Expr) goast.Expr

func (*Togo) ResolveDynamicVar

func (t *Togo) ResolveDynamicVar(varName phpast.Expr) goast.Node

func (*Togo) ToGoBlock

func (t *Togo) ToGoBlock(p phpast.Statement) *goast.BlockStmt

func (*Togo) ToGoExpr

func (t *Togo) ToGoExpr(p phpast.Expr) goast.Expr

func (*Togo) ToGoOperator

func (t *Togo) ToGoOperator(php string) token.Token

func (*Togo) ToGoStmt

func (t *Togo) ToGoStmt(php phpast.Statement) goast.Stmt

func (*Togo) TranslateIf

func (t *Togo) TranslateIf(p phpast.IfStmt) *goast.IfStmt

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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