Clang import; FloatingLiteral

This commit is contained in:
Daniel Marjamäki 2020-01-20 14:09:21 +01:00
parent 0cf82d6d45
commit dea6cc3b76
1 changed files with 3 additions and 0 deletions

View File

@ -52,6 +52,7 @@ static const std::string DeclRefExpr = "DeclRefExpr";
static const std::string DeclStmt = "DeclStmt"; static const std::string DeclStmt = "DeclStmt";
static const std::string ExprWithCleanups = "ExprWithCleanups"; static const std::string ExprWithCleanups = "ExprWithCleanups";
static const std::string FieldDecl = "FieldDecl"; static const std::string FieldDecl = "FieldDecl";
static const std::string FloatingLiteral = "FloatingLiteral";
static const std::string ForStmt = "ForStmt"; static const std::string ForStmt = "ForStmt";
static const std::string FunctionDecl = "FunctionDecl"; static const std::string FunctionDecl = "FunctionDecl";
static const std::string FunctionTemplateDecl = "FunctionTemplateDecl"; static const std::string FunctionTemplateDecl = "FunctionTemplateDecl";
@ -638,6 +639,8 @@ Token *clangimport::AstNode::createTokens(TokenList *tokenList)
return children[0]->createTokens(tokenList); return children[0]->createTokens(tokenList);
if (nodeType == FieldDecl) if (nodeType == FieldDecl)
return createTokensVarDecl(tokenList); return createTokensVarDecl(tokenList);
if (nodeType == FloatingLiteral)
return addtoken(tokenList, mExtTokens.back());
if (nodeType == ForStmt) { if (nodeType == ForStmt) {
Token *forToken = addtoken(tokenList, "for"); Token *forToken = addtoken(tokenList, "for");
Token *par1 = addtoken(tokenList, "("); Token *par1 = addtoken(tokenList, "(");