cconstant

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Mar 5, 2023 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Bool

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

************************************* Bool *************************************

func NewBool

func NewBool(x bool) *Bool

func (*Bool) CIRString

func (b *Bool) CIRString() string

func (*Bool) IsExpr

func (b *Bool) IsExpr()

func (*Bool) Type

func (b *Bool) Type() ctypes.Type

type Constant

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

type Double

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

************************************* Double: *************************************

func NewDouble

func NewDouble(v float64) *Double

func (*Double) CIRString

func (d *Double) CIRString() string

func (*Double) IsExpr

func (d *Double) IsExpr()

func (*Double) Type

func (d *Double) Type() ctypes.Type

type Float

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

************************************* Float: *************************************

func NewFloat

func NewFloat(v float32) *Float

func (*Float) CIRString

func (f *Float) CIRString() string

func (*Float) IsExpr

func (d *Float) IsExpr()

func (*Float) Type

func (f *Float) Type() ctypes.Type

type Int

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

************************************* Int: 整型常数 *************************************

func NewInt

func NewInt(t *ctypes.IntType, v int64) *Int

NewInt() 根据指定的类型和常数值创建整型常数

func NewIntFromString

func NewIntFromString(t *ctypes.IntType, s string) (*Int, error)

NewIntFromString() 从字符串中创建指定类型的整型常数 字符串可为以下形式之一:

  • boolean literal true | false
  • integer literal [-]?[0-9]+
  • hexadecimal integer literal [us]0x[0-9A-Fa-f]+

func (*Int) CIRString

func (c *Int) CIRString() string

String returns the LLVM syntax representation of the constant as a type-value pair.

func (*Int) Ident

func (c *Int) Ident() string

Ident returns the identifier associated with the constant.

func (*Int) IsExpr

func (c *Int) IsExpr()

func (*Int) Type

func (c *Int) Type() ctypes.Type

Type returns the type of the constant.

type StringLit

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

************************************* StringLit: *************************************

func NewStringLit

func NewStringLit(v string) *StringLit

func (*StringLit) CIRString

func (s *StringLit) CIRString() string

func (*StringLit) IsExpr

func (s *StringLit) IsExpr()

func (*StringLit) Type

func (s *StringLit) Type() ctypes.Type

type Zero

type Zero struct {
}

************************************* Zero: 0值常数 *************************************

func NewZero

func NewZero() *Zero

func (*Zero) CIRString

func (z *Zero) CIRString() string

func (*Zero) IsExpr

func (z *Zero) IsExpr()

func (*Zero) Type

func (z *Zero) Type() ctypes.Type

Jump to

Keyboard shortcuts

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