Skip to content

v3.gen.fastc

fn generate #

fn generate(source string, path string, prefs &pref.Preferences) !string

generate scans V source and emits C as each declaration and statement is consumed. It does not construct an AST or invoke semantic type checking. Unsupported syntax is returned as an error; FastC never retries through an AST-based backend.

fn generate_files #

fn generate_files(paths []string, prefs &pref.Preferences) !string

generate_files discovers imports from the input files and emits one C translation unit for the complete source graph. Discovery and generation use scanner tokens only.

fn generate_files_with_source_paths #

fn generate_files_with_source_paths(paths []string, prefs &pref.Preferences) !GenerationResult

generate_files_with_source_paths emits C and reports every source read during import discovery.

fn FastcDeclaredTypeKind.from #

fn FastcDeclaredTypeKind.from[W](input W) !FastcDeclaredTypeKind

struct GenerationResult #

struct GenerationResult {
pub:
	c_source     string
	source_paths []string
}

GenerationResult contains generated C and the complete resolved V source graph.