csharp

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2024 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CSharpExprGenerator

type CSharpExprGenerator struct {
	*gen.GenExprDispatcher
	GenType          func(definition.Type) (string, error)
	ValueStr         string
	LiteralGenerator gen.LiteralGeneratorImpl // optional
}

func NewCSharpExprGenerator

func NewCSharpExprGenerator(genType func(definition.Type) (string, error), valueStr string) *CSharpExprGenerator

func (CSharpExprGenerator) GenerateBinopExpr

func (g CSharpExprGenerator) GenerateBinopExpr(expr *definition.BinopExpr) (string, error)

func (CSharpExprGenerator) GenerateCastExpr

func (g CSharpExprGenerator) GenerateCastExpr(expr *definition.CastExpr) (string, error)

func (CSharpExprGenerator) GenerateConstantExpr

func (g CSharpExprGenerator) GenerateConstantExpr(expr *definition.ConstantExpr) (string, error)

func (CSharpExprGenerator) GenerateExpr

func (g CSharpExprGenerator) GenerateExpr(expr definition.Expr) (string, error)

func (CSharpExprGenerator) GenerateRawExpr

func (g CSharpExprGenerator) GenerateRawExpr(expr *definition.RawExpr) (string, error)

func (CSharpExprGenerator) GenerateTenaryExpr

func (g CSharpExprGenerator) GenerateTenaryExpr(expr *definition.TenaryExpr) (string, error)

func (CSharpExprGenerator) GenerateUnopExpr

func (g CSharpExprGenerator) GenerateUnopExpr(expr *definition.UnopExpr) (string, error)

func (CSharpExprGenerator) GenerateValueExpr

func (g CSharpExprGenerator) GenerateValueExpr(expr *definition.ValueExpr) (string, error)

type CSharpGenerator

type CSharpGenerator struct {
	*gen.GenDispatcher
	GenCtx   *gen.GenCtx
	GenUnits *util.OrderedMap[string, *GeneratedUnit]
	GenTypes *util.OrderedMap[string, *GeneratedType]
	GenStack *util.OrderedMap[string, any]
	Warning  definition.TopLevelWarning
}

func NewCSharpGenerator

func NewCSharpGenerator() *CSharpGenerator

func (*CSharpGenerator) Generate

func (g *CSharpGenerator) Generate(ctx *gen.GenCtx) (retErr error, retWarnings error)

func (CSharpGenerator) GenerateArray

func (g CSharpGenerator) GenerateArray(array *definition.Array) (string, error)

func (CSharpGenerator) GenerateArrayDefaultValue

func (g CSharpGenerator) GenerateArrayDefaultValue(array *definition.Array) (string, error)

func (CSharpGenerator) GenerateBasicType

func (g CSharpGenerator) GenerateBasicType(type_ *definition.BasicType) (string, error)

func (CSharpGenerator) GenerateBasicTypeDefaultValue

func (g CSharpGenerator) GenerateBasicTypeDefaultValue(type_ *definition.BasicType) (string, error)

func (CSharpGenerator) GenerateBytes

func (g CSharpGenerator) GenerateBytes(bytes *definition.Bytes) (string, error)

func (CSharpGenerator) GenerateBytesDefaultValue

func (g CSharpGenerator) GenerateBytesDefaultValue(bytes *definition.Bytes) (string, error)

func (CSharpGenerator) GenerateConstantField

func (g CSharpGenerator) GenerateConstantField(field *definition.ConstantField) (string, error)

func (CSharpGenerator) GenerateCustomGetter

func (g CSharpGenerator) GenerateCustomGetter(method *definition.GetMethod) (string, error)

func (CSharpGenerator) GenerateCustomGetterDecl

func (g CSharpGenerator) GenerateCustomGetterDecl(method *definition.GetMethod) (string, error)

func (CSharpGenerator) GenerateCustomGetterSetter added in v0.7.0

func (g CSharpGenerator) GenerateCustomGetterSetter(group *util.OrderedMap[definition.MethodKindID, definition.Method]) (string, error)

func (CSharpGenerator) GenerateCustomSetter

func (g CSharpGenerator) GenerateCustomSetter(method *definition.SetMethod) (string, error)

func (CSharpGenerator) GenerateCustomSetterDecl

func (g CSharpGenerator) GenerateCustomSetterDecl(method *definition.SetMethod) (string, error)

func (CSharpGenerator) GenerateDecoder

func (g CSharpGenerator) GenerateDecoder(structDef *definition.Struct) (string, error)

func (CSharpGenerator) GenerateDefaultGetter

func (g CSharpGenerator) GenerateDefaultGetter(method *definition.GetMethod) (string, error)

func (CSharpGenerator) GenerateDefaultGetterDecl

func (g CSharpGenerator) GenerateDefaultGetterDecl(method *definition.GetMethod) (string, error)

func (CSharpGenerator) GenerateDefaultSetter

func (g CSharpGenerator) GenerateDefaultSetter(method *definition.SetMethod) (string, error)

func (CSharpGenerator) GenerateDefaultSetterDecl

func (g CSharpGenerator) GenerateDefaultSetterDecl(method *definition.SetMethod) (string, error)

func (CSharpGenerator) GenerateEmbeddedField

func (g CSharpGenerator) GenerateEmbeddedField(field *definition.EmbeddedField) (string, error)

func (CSharpGenerator) GenerateEncoder

func (g CSharpGenerator) GenerateEncoder(structDef *definition.Struct) (string, error)

func (CSharpGenerator) GenerateEnum

func (g CSharpGenerator) GenerateEnum(enumDef *definition.Enum) (string, error)

func (CSharpGenerator) GenerateEnumDefaultValue

func (g CSharpGenerator) GenerateEnumDefaultValue(enumDef *definition.Enum) (string, error)

func (CSharpGenerator) GenerateExpr

func (g CSharpGenerator) GenerateExpr(expr definition.Expr, valueStr string) (string, error)

func (CSharpGenerator) GenerateField

func (g CSharpGenerator) GenerateField(field definition.Field) (string, error)

func (CSharpGenerator) GenerateMethod

func (g CSharpGenerator) GenerateMethod(method definition.Method) (string, error)

func (CSharpGenerator) GenerateMethodDecl

func (g CSharpGenerator) GenerateMethodDecl(method definition.Method) (string, error)

func (CSharpGenerator) GenerateNormalField

func (g CSharpGenerator) GenerateNormalField(field *definition.NormalField) (string, error)

func (CSharpGenerator) GenerateRawGetterDecl

func (g CSharpGenerator) GenerateRawGetterDecl(field definition.Field) (string, error)

func (CSharpGenerator) GenerateRawGetterSetter added in v0.7.0

func (g CSharpGenerator) GenerateRawGetterSetter(field definition.Field) (string, error)

func (CSharpGenerator) GenerateRawSetterDecl

func (g CSharpGenerator) GenerateRawSetterDecl(field definition.Field) (string, error)

func (CSharpGenerator) GenerateString

func (g CSharpGenerator) GenerateString(string_ *definition.String) (string, error)

func (CSharpGenerator) GenerateStringDefaultValue

func (g CSharpGenerator) GenerateStringDefaultValue(string_ *definition.String) (string, error)

func (CSharpGenerator) GenerateStruct

func (g CSharpGenerator) GenerateStruct(structDef *definition.Struct) (string, error)

func (CSharpGenerator) GenerateStructDefaultValue

func (g CSharpGenerator) GenerateStructDefaultValue(structDef *definition.Struct) (string, error)

func (CSharpGenerator) GenerateType

func (g CSharpGenerator) GenerateType(type_ definition.Type) (string, error)

func (CSharpGenerator) GenerateTypeDefaultValue

func (g CSharpGenerator) GenerateTypeDefaultValue(type_ definition.Type) (string, error)

func (CSharpGenerator) GenerateUnit

func (g CSharpGenerator) GenerateUnit(unit *definition.CompilationUnit) error

func (CSharpGenerator) GenerateVoidField

func (g CSharpGenerator) GenerateVoidField(field *definition.VoidField) (string, error)

type CSharpLiteralGenerator

type CSharpLiteralGenerator struct {
	*gen.GenLiteralDispatcher
}

func NewCSharpLiteralGenerator

func NewCSharpLiteralGenerator() *CSharpLiteralGenerator

func (CSharpLiteralGenerator) GenerateBoolLiteral

func (g CSharpLiteralGenerator) GenerateBoolLiteral(literal *definition.BoolLiteral) (string, error)

func (CSharpLiteralGenerator) GenerateFloatLiteral

func (g CSharpLiteralGenerator) GenerateFloatLiteral(literal *definition.FloatLiteral) (string, error)

func (CSharpLiteralGenerator) GenerateIntLiteral

func (g CSharpLiteralGenerator) GenerateIntLiteral(literal *definition.IntLiteral) (string, error)

func (CSharpLiteralGenerator) GenerateLiteral

func (g CSharpLiteralGenerator) GenerateLiteral(literal definition.Literal) (string, error)

func (CSharpLiteralGenerator) GenerateStringLiteral

func (g CSharpLiteralGenerator) GenerateStringLiteral(literal *definition.StringLiteral) (string, error)

type GeneratedType

type GeneratedType struct {
	GeneratedDef string
}

type GeneratedUnit added in v0.7.0

type GeneratedUnit struct {
	SourceUnit     *definition.CompilationUnit
	GeneratedTypes *util.OrderedMap[string, *GeneratedType]
}

Jump to

Keyboard shortcuts

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