Crate baobao_codegen

Crate baobao_codegen 

Source
Expand description

Shared code generation utilities for Bao CLI generator.

This crate provides language-agnostic abstractions and utilities used by language-specific code generators (e.g., bao-codegen-rust).

Structs§

CodeBuilder
Fluent API for building code with proper indentation.
CommandInfo
Info about a command for code generation
CommandTree
A traversable view of the command tree in a schema.
ContextFieldInfo
Info about a context field for code generation
DependencyCollector
Tracks package dependencies with versions and features.
DependencySpec
Specification for a package dependency.
FileBuilder
Composable file builder that combines import collection with code generation.
FlatCommand
Flattened command info for easier processing.
GenerateResult
Result of code generation
HandlerPaths
Manages handler file paths for a code generator.
ImportCollector
Tracks imports and deduplicates them.
NamingConvention
Language-specific naming conventions.
PoolConfigInfo
Pool configuration for code generation
PreviewFile
A generated file for preview
SqliteConfigInfo
SQLite-specific configuration for code generation

Enums§

Indent
Indentation style for generated code.

Traits§

LanguageCodegen
Trait for language-specific code generators.
TypeMapper
Trait for mapping schema types to language-specific type strings.