gdGenerator

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CurrentLanguage = gValues.LanguageGd
)
View Source
const (
	DefaultFileNamingStyle = gValues.StyleSnakeCase
)

Variables

View Source
var (
	LanguageAliases = []string{
		"gd",
		"godot",
		"gdscript",
	}

	CCLTypesToGdTypes = map[string]string{
		"int":      "int",
		"uint":     "int",
		"int8":     "int",
		"uint8":    "int",
		"int16":    "int",
		"uint16":   "int",
		"int32":    "int",
		"uint32":   "int",
		"int64":    "int",
		"uint64":   "int",
		"float":    "float",
		"float64":  "float",
		"float32":  "float",
		"string":   "String",
		"bool":     "bool",
		"datetime": "int",
		"bytes":    "PackedByteArray",
	}
)

Functions

func GenerateCode

func GenerateCode(options *gen.CodeGenerationOptions) (*gen.CodeGenerationResult, error)

GenerateCode generates GDScript code from the provided CCL source file.

Types

type CCLField

CCLField is a type alias for the field definition type from the CCL's internal packages.

type CCLModel

type CCLModel = cclValues.ModelDefinition

CCLModel is a type alias for the model definition type from the CCL's internal packages.

type GDScriptGenerationContext

type GDScriptGenerationContext struct {
	*gen.CodeGenerationBase

	// One builder per model class file
	ModelClasses  map[string]*codeBuilder.CodeBuilder
	ModelSections map[string][]string

	// OutputFiles is the list of generated files.
	OutputFiles []string
}

func (*GDScriptGenerationContext) GenerateCode

func (c *GDScriptGenerationContext) GenerateCode() error

Jump to

Keyboard shortcuts

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