| 812 | } |
| 813 | |
| 814 | bool Module::compileBuiltinModule ( const string & modName, const unsigned char * const str, unsigned int str_len ) { |
| 815 | TextWriter issues; |
| 816 | auto access = make_smart<FileAccess>(); |
| 817 | auto fileInfo = make_unique<TextFileInfo>((char *) str, uint32_t(str_len), false); |
| 818 | access->setFileInfo(modName, das::move(fileInfo)); |
| 819 | ModuleGroup dummyLibGroup; |
| 820 | auto program = parseDaScript(modName, "", access, issues, dummyLibGroup, true); |
| 821 | ownFileInfo = access->letGoOfFileInfo(modName); |
| 822 | DAS_ASSERTF(ownFileInfo,"something went wrong and FileInfo for builtin module can not be obtained"); |
| 823 | auto result = appendBuiltinModuleContent(this, program, modName); |
| 824 | program->thisModule->module_gc_root->gc_dump_to_thread_root(); |
| 825 | return result; |
| 826 | } |
| 827 | |
| 828 | bool isValidBuiltinName ( const string & name, bool canPunkt ) { |
| 829 | if ( name.size()>=2 && name[0]=='.' && name[1]=='`') { // any name starting with .` is ok |
nothing calls this directly
no test coverage detected