summaryrefslogtreecommitdiff
path: root/src/parsers/functiondeclnode.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-06-03 23:38:19 +0300
committerAndrei Karas <akaras@inbox.ru>2015-06-03 23:38:19 +0300
commitde6244d0df34e203a51e24cbdb4e126b6146d321 (patch)
tree9bcc7c53deea25660dd0f07e4cdcbf0051333ac3 /src/parsers/functiondeclnode.cpp
parent342f6ec4820d3087e1c16204c7a788a165a00f48 (diff)
downloadparanucker-de6244d0df34e203a51e24cbdb4e126b6146d321.tar.gz
paranucker-de6244d0df34e203a51e24cbdb4e126b6146d321.tar.bz2
paranucker-de6244d0df34e203a51e24cbdb4e126b6146d321.tar.xz
paranucker-de6244d0df34e203a51e24cbdb4e126b6146d321.zip
Create base DeclNode and parser for it.
Diffstat (limited to 'src/parsers/functiondeclnode.cpp')
-rw-r--r--src/parsers/functiondeclnode.cpp7
1 files changed, 6 insertions, 1 deletions
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<FunctionTypeNode*>(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);
}
}