diff options
| -rw-r--r-- | docs/guide/settings.md | 1 | ||||
| -rw-r--r-- | typeparser.cpp | 8 |
2 files changed, 7 insertions, 2 deletions
diff --git a/docs/guide/settings.md b/docs/guide/settings.md index a2fe6226..cd3c6ea9 100644 --- a/docs/guide/settings.md +++ b/docs/guide/settings.md @@ -92,7 +92,6 @@ All settings are uniquely identified with an identifier string. Identifiers are |analysis|Tail Call Translation|Performs tail call translation for jump instructions where the target is an existing function start.|`boolean`|`True`|[`SettingsProjectScope`, `SettingsUserScope`, `SettingsResourceScope`]|<a id='analysis.tailCallTranslation'>analysis.tailCallTranslation</a>| |analysis|Padding Threshold|Specify the minimum number of undefined bytes in a structure type before __padding notation is used when rendering the type to text. This setting does not affect exporting types to a file, where the __padding notation will always be used.|`number`|`1024`|[`SettingsProjectScope`, `SettingsUserScope`, `SettingsResourceScope`]|<a id='analysis.types.paddingThreshold'>analysis.types.paddingThreshold</a>| |analysis|Type Parser|Specify the implementation used for parsing types from text.|`string`|`ClangTypeParser`|[`SettingsProjectScope`, `SettingsUserScope`, `SettingsResourceScope`]|<a id='analysis.types.parserName'>analysis.types.parserName</a>| -| | | |`enum`|`CoreTypeParser`| | | | | | |`enum`|`ClangTypeParser`| | | |analysis|Type Printer|Specify the implementation used for formatting types into text.|`string`|`CoreTypePrinter`|[`SettingsProjectScope`, `SettingsUserScope`, `SettingsResourceScope`]|<a id='analysis.types.printerName'>analysis.types.printerName</a>| | | | |`enum`|`CoreTypePrinter`| | | diff --git a/typeparser.cpp b/typeparser.cpp index 6124004c..3a93d5fd 100644 --- a/typeparser.cpp +++ b/typeparser.cpp @@ -39,7 +39,13 @@ Ref<TypeParser> TypeParser::GetByName(const string& name) Ref<TypeParser> TypeParser::GetDefault() { string name = Settings::Instance()->Get<string>("analysis.types.parserName"); - return GetByName(name); + auto parser = GetByName(name); + if (!parser) + { + // If the type parser specified doesn't exist, get the actual default type parser + parser = GetByName("ClangTypeParser"); + } + return parser; } |
