From de6244d0df34e203a51e24cbdb4e126b6146d321 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Wed, 3 Jun 2015 23:38:19 +0300 Subject: Create base DeclNode and parser for it. --- src/parsers/functiondeclnode.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'src/parsers/functiondeclnode.cpp') diff --git a/src/parsers/functiondeclnode.cpp b/src/parsers/functiondeclnode.cpp index fbd5919..e5a0773 100644 --- a/src/parsers/functiondeclnode.cpp +++ b/src/parsers/functiondeclnode.cpp @@ -21,6 +21,7 @@ #include "logger.h" +#include "parsers/declnode.h" #include "parsers/generic.h" #include "nodes/functiondeclnode.h" @@ -35,6 +36,8 @@ void parseFunctionDeclNode(FunctionDeclNode *node) { fillType(node); fillLocation(node); + fillDeclLabel(node); + fillDeclAttributes(node); Log::log(node); node->functionType = static_cast(createParseNode( node, @@ -60,13 +63,15 @@ void parseFunctionDeclNode(FunctionDeclNode *node) node, DECL_FUNCTION_SPECIFIC_TARGET(node->gccNode), "target"); - node->hasTargets = DECL_FUNCTION_VERSIONED(node->gccNode) ? true : false; + node->hasTargets = DECL_FUNCTION_VERSIONED(node->gccNode); node->optimisation = createParseNode( node, DECL_FUNCTION_SPECIFIC_OPTIMIZATION(node->gccNode), "optiomisations"); node->isVirtual = DECL_VIRTUAL_P(node->gccNode); node->isFinal = DECL_FINAL_P(node->gccNode); + node->isConst = TREE_READONLY(node->gccNode); + node->isPure = DECL_PURE_P(node->gccNode); } } -- cgit v1.2.3-60-g2f50