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.
| 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 |
no test coverage detected