Clang import: Throw InternalError when nodeType is unknown

This commit is contained in:
Daniel Marjamäki 2020-12-31 17:48:39 +01:00
parent f37274a5c0
commit 589174b92d
1 changed files with 1 additions and 1 deletions

View File

@ -1192,7 +1192,7 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
createScope(tokenList, Scope::ScopeType::eWhile, body, whiletok);
return nullptr;
}
return addtoken(tokenList, "?" + nodeType + "?");
throw InternalError(tokenList->back(), "ClangImport::AstNode::createTokens: Unhandled nodeType: nodeType");
}
Token * clangimport::AstNode::createTokensCall(TokenList *tokenList)