python

package
v0.0.0-...-27647ab Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2023 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Render

func Render(w *iou.IndentWriter, n Node)

func RenderString

func RenderString(n Node) string

Types

type And

type And struct {
	Children []Node
	// contains filtered or unexported fields
}

type Arith

type Arith struct {
	Op    ArithOp
	Left  Node
	Right Node
	// contains filtered or unexported fields
}

type ArithOp

type ArithOp int8
const (
	ArithInvalid ArithOp = iota

	ArithAdd
	ArithSub
	ArithMul
	ArithDiv
	ArithMod
	ArithPow
	ArithFloorDiv
	ArithMatMul

	ArithAnd
	ArithOr
	ArithShl
	ArithShr
)

func ParseArithOp

func ParseArithOp(s string) ArithOp

func (ArithOp) String

func (o ArithOp) String() string

type Attr

type Attr struct {
	Child Node
	Name  string
	// contains filtered or unexported fields
}

type Brackets

type Brackets struct {
	Children []Node
	// contains filtered or unexported fields
}

type Cmp

type Cmp struct {
	Left  Node
	Items []CmpItem
	// contains filtered or unexported fields
}

type CmpItem

type CmpItem struct {
	Op    CmpOp
	Right Node
}

type CmpOp

type CmpOp int8
const (
	CmpInvalid CmpOp = iota
	CmpEq
	CmpNe
	CmpGt
	CmpGe
	CmpLt
	CmpLe
)

func ParseCmpOp

func ParseCmpOp(s string) CmpOp

func (CmpOp) String

func (o CmpOp) String() string

type Dict

type Dict struct {
	Items []DictItem
	// contains filtered or unexported fields
}

type DictItem

type DictItem struct {
	IsStars bool

	K Node
	V Node
}

type Ellipsis

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

type False

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

type Name

type Name struct {
	S string
	// contains filtered or unexported fields
}

type Node

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

func ParseNode

func ParseNode(s string) Node

type None

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

type Not

type Not struct {
	Child Node
	// contains filtered or unexported fields
}

type Number

type Number struct {
	S string
	// contains filtered or unexported fields
}

type Or

type Or struct {
	Children []Node
	// contains filtered or unexported fields
}

type Parens

type Parens struct {
	Children []Node
	// contains filtered or unexported fields
}

type Set

type Set struct {
	Children []Node
	// contains filtered or unexported fields
}

type Slice

type Slice struct {
	Start Node
	Stop  Node
	Step  Node
	// contains filtered or unexported fields
}

type Star

type Star struct {
	Child Node
	// contains filtered or unexported fields
}

type String

type String struct {
	S []string
	// contains filtered or unexported fields
}

type Subscript

type Subscript struct {
	Child Node
	Items []Node
	// contains filtered or unexported fields
}

type True

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

type Unary

type Unary struct {
	Op    UnaryOp
	Child Node
	// contains filtered or unexported fields
}

type UnaryOp

type UnaryOp int8
const (
	UnaryInvalid UnaryOp = iota

	UnaryPlus
	UnaryMinus
)

func ParseUnaryOp

func ParseUnaryOp(s string) UnaryOp

func (UnaryOp) String

func (o UnaryOp) String() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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