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

Function SubstituteBuiltinModuleRefs

src/ast/ast_module.cpp:27–30  ·  view source on GitHub ↗

Builtin modules are sometimes compiled from both native code and das code. In that case das code is parsed via parseDaScript function producing ProgramPtr It internally references itself, whereas it should actually reference the builtin module This visitor walks the program and substitutes references from parsed to builtin module.

Source from the content-addressed store, hash-verified

25 //! It internally references itself, whereas it should actually reference the builtin module
26 //! This visitor walks the program and substitutes references from parsed to builtin module.
27 void SubstituteBuiltinModuleRefs ( ProgramPtr program, Module * from, Module * to ) {
28 SubstituteModuleRefs subs ( from, to );
29 program->visit(subs,/*visitGenerics =*/true);
30 }
31
32 bool splitTypeName ( const string & name, string & moduleName, string & funcName ) {
33 // Find the first '::' that is NOT inside angle brackets — template-instance

Callers 1

Calls 1

visitMethod · 0.45

Tested by

no test coverage detected