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

Function addModuleOption

src/builtin/module_builtin_ast.cpp:797–802  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

795 }
796
797 void addModuleOption ( Module * mod, char * option, Type type, Context * context, LineInfoArg * at ) {
798 if ( !mod ) context->throw_error_at(at, "expecting module");
799 if ( !option ) context->throw_error_at(at, "expecting option name");
800 if ( mod->getOptionType(option) != Type::none ) context->throw_error_at(at, "option %s already exists", option);
801 mod->options[option] = type;
802 }
803
804 TypeDeclPtr getUnderlyingValueType ( TypeDecl * type, Context * context, LineInfoArg * at ) {
805 if ( !type ) context->throw_error_at(at, "expecting type");

Callers

nothing calls this directly

Calls 2

throw_error_atMethod · 0.80
getOptionTypeMethod · 0.80

Tested by

no test coverage detected