MCPcopy Create free account
hub / github.com/GaijinEntertainment/daScript / preVisit

Method preVisit

src/ast/ast_annotations.cpp:26–38  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

24 }
25
26 virtual void preVisit ( Structure * var ) override {
27 Visitor::preVisit(var);
28 for ( const auto & pA : var->annotations ) {
29 if (pA->annotation->rtti_isStructureAnnotation()) {
30 auto sa = static_cast<StructureAnnotation*>(pA->annotation);
31 string err = "";
32 if (!sa->look(var, *program->thisModuleGroup, pA->arguments, err)) {
33 program->error("can't finalize structure annotation [" + sa->name + "]",err,"",
34 var->at, CompilationError::cant_finalize_structure_annotation);
35 }
36 }
37 }
38 }
39 virtual void preVisit ( Function * fn ) override {
40 Visitor::preVisit(fn);
41 for ( const auto & an : fn->annotations ) {

Callers

nothing calls this directly

Calls 6

preVisitFunction · 0.85
lookMethod · 0.45
errorMethod · 0.45
finalizeMethod · 0.45
sizeMethod · 0.45

Tested by

no test coverage detected