This pass will go through all the annotations and perform the ast transformations needed (note except for the operator annotations since those must be done during the expression pass)
Function Wrapper annotations
wrap the inside of a function in another function and we want to supply all the information for that annotation in this conversion
pack Union {
name: string,
options: UnionOption[],
}
pack UnionOption {
name: string,
blah blah blah
}
function pack_generator(pack_object: Pack) -> (code: string);
function union_generator(union_object: Union) -> (code: string);
Function argument annotation
- Processes the argument before the function is run
function argument_annotation(value: lazy auto T) -> (result: T)
Tag annotations
- Can be used on anything and are used for analysis passes
- don't have a function assigned to them as they are kind of outside the language
- things like documentation where a plugin step would go through the ast and generate
This pass will go through all the annotations and perform the ast transformations needed (note except for the operator annotations since those must be done during the expression pass)
Function Wrapper annotations
pack/union function generation annotations
pack PackMember { name: string, type: Type, default_value: lazy auto T, # idk }
pack Union { name: string, options: UnionOption[], }
pack UnionOption { name: string,
blah blah blah
}
function pack_generator(pack_object: Pack) -> (code: string); function union_generator(union_object: Union) -> (code: string);
function argument_annotation(value: lazy auto T) -> (result: T)