Files
herolib/lib/core/codegenerator/factory.v
2025-11-23 08:29:37 +01:00

27 lines
494 B
V

module codegenerator
@[params]
pub struct GeneratorOptions {
pub:
parser_path string @[required]
output_dir string @[required]
recursive bool = true
format bool = true
}
pub fn new(args GeneratorOptions) !CodeGenerator {
import incubaid.herolib.core.codeparser
mut parser := codeparser.new(
path: args.parser_path
recursive: args.recursive
)!
parser.parse()!
return CodeGenerator{
parser: parser
output_dir: args.output_dir
format: args.format
}
}