Files
herolib/lib/core/codegenerator/factory.v
2025-11-24 05:48:13 +01:00

28 lines
493 B
V

module codegenerator
import incubaid.herolib.core.codeparser
@[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 {
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
}
}