test

package
v0.0.0-...-51ce559 Latest Latest
Warning

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

Go to latest
Published: Sep 11, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package test brings z7zmey/php-parser nodes to the p package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BinaryOp

func BinaryOp(left node.Node, op string, right node.Node) node.Node

BinaryOp creates from two nodes binary operand specified by op.

func Float

func Float(value string) *scalar.Dnumber

Float returns simple data type float with given value.

func Func

func Func(name string) *stmt.Function

Func creates empty function with given name.

func HTML

func HTML(value string) *stmt.InlineHtml

HTML returns node representing HTML outside <?php ?>.

func Int

func Int(value string) *scalar.Lnumber

Int returns simple data type int with given value.

func List

func List(nodes []node.Node) *stmt.StmtList

List creates statement list from array, commonly represented by a block.

func Minus

func Minus(e node.Node) *expr.UnaryMinus

Minus prepends minus for node e.

func Name

func Name(parts ...string) *name.Name

Name turns array of string to a name node. This is used around constants and return types, for instance.

func Nop

func Nop() *stmt.Nop

Nop creates empty statement, in a script it is represented by semicolon or empty <?php ?>.

func Plus

func Plus(e node.Node) *expr.UnaryPlus

Plus prepends plus for node e.

func String

func String(value string) *scalar.String

String creates simple scalar from given value.

func Variable

func Variable(name string) *expr.Variable

Variable creates a new variable with given name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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