vn/code/vn_scene.md

34 lines
821 B
Markdown

@table(Name, NameLower, Contents) scene_ast_node_types:
{
{ Invalid invalid `` }
{ BlockStatement block_statement `scene_ast_node *First; scene_ast_node *Last;` }
{ SceneDecl scene_declaration `` }
}
@table_gen_enum scene_ast_node_type:
{
@expand(scene_ast_node_types s) `S_AstNode_$(s.Name),`;
`S_AstNode_Count,`:
}
@table_gen
{
`struct scene_ast_node;`
}
@table_gen
{
@expand(scene_ast_node_types s) `struct scene_ast_node_$(s.NameLower) {$(s.Contents)};`
}
@table_gen
{
`struct scene_ast_node`;
`{`;
`scene_ast_node_type Type;`;
`union`;
`{`;
@expand(scene_ast_node_types s) `scene_ast_node_$(s.NameLower) $(s.Name)Data;`;
`};`;
`};`;
}