diff options
author | Lionel Elie Mamane <lionel@mamane.lu> | 2011-10-30 13:34:01 +0100 |
---|---|---|
committer | Lionel Elie Mamane <lionel@mamane.lu> | 2011-10-30 13:37:02 +0100 |
commit | 6efdf794cdd0c979ffead0e5051309f711b23997 (patch) | |
tree | 9ba7eebdcd64e9d85c7543ef6547204824996cc1 /connectivity | |
parent | eaa8cb8ee384f4edbe77aaa9a533d62064622fbf (diff) |
factorise multiple SQL_ISRULEOR2 implementations into one
Diffstat (limited to 'connectivity')
-rw-r--r-- | connectivity/inc/connectivity/sqlnode.hxx | 7 | ||||
-rw-r--r-- | connectivity/source/parse/sqliterator.cxx | 4 |
2 files changed, 7 insertions, 4 deletions
diff --git a/connectivity/inc/connectivity/sqlnode.hxx b/connectivity/inc/connectivity/sqlnode.hxx index 932970273bb3..1d8381a9a321 100644 --- a/connectivity/inc/connectivity/sqlnode.hxx +++ b/connectivity/inc/connectivity/sqlnode.hxx @@ -464,6 +464,13 @@ namespace connectivity // utilities to query for a specific rule, token or punctuation #define SQL_ISRULE(pParseNode, eRule) ((pParseNode)->isRule() && (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::eRule)) + #define SQL_ISRULEOR2(pParseNode, e1, e2) ((pParseNode)->isRule() && ( \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2))) + #define SQL_ISRULEOR3(pParseNode, e1, e2, e3) ((pParseNode)->isRule() && ( \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2) || \ + (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e3))) #define SQL_ISTOKEN(pParseNode, token) ((pParseNode)->isToken() && (pParseNode)->getTokenID() == SQL_TOKEN_##token) #define SQL_ISTOKENOR2(pParseNode, tok0, tok1) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 )) #define SQL_ISTOKENOR3(pParseNode, tok0, tok1, tok2) ((pParseNode)->isToken() && ( (pParseNode)->getTokenID() == SQL_TOKEN_##tok0 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok1 || (pParseNode)->getTokenID() == SQL_TOKEN_##tok2 )) diff --git a/connectivity/source/parse/sqliterator.cxx b/connectivity/source/parse/sqliterator.cxx index 0c3b6a0cd958..325523c9f8e4 100644 --- a/connectivity/source/parse/sqliterator.cxx +++ b/connectivity/source/parse/sqliterator.cxx @@ -51,10 +51,6 @@ #include "diagnose_ex.h" #include <rtl/logfile.hxx> -#define SQL_ISRULEOR2(pParseNode, e1,e2) ((pParseNode)->isRule() && (\ - (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e1) || \ - (pParseNode)->getRuleID() == OSQLParser::RuleID(OSQLParseNode::e2))) - using namespace ::comphelper; using namespace ::connectivity; using namespace ::connectivity::sdbcx; |