lib/antlr/antlr/ASTPair.hpp
Go to the documentation of this file.00001
#ifndef INC_ASTPair_hpp__
00002
#define INC_ASTPair_hpp__
00003
00004
00005
00006
00007
00008
00009
00010
00011
#include <antlr/config.hpp>
00012
#include <antlr/AST.hpp>
00013
00014
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00015
namespace antlr {
00016
#endif
00017
00026 class ANTLR_API ASTPair {
00027
public:
00028 RefAST root;
00029 RefAST child;
00030
00032 void advanceChildToEnd() {
00033
if (child) {
00034
while (child->getNextSibling()) {
00035 child = child->getNextSibling();
00036 }
00037 }
00038 }
00039
00040
00041
00042
00043
00044
00045
00046 ANTLR_USE_NAMESPACE(std)string toString()
const {
00047
ANTLR_USE_NAMESPACE(std)string r = !root ?
ANTLR_USE_NAMESPACE(std)string(
"null") : root->getText();
00048
ANTLR_USE_NAMESPACE(std)string c = !child ?
ANTLR_USE_NAMESPACE(std)string(
"null") : child->getText();
00049
return "["+r+
","+c+
"]";
00050 }
00051 };
00052
00053
#ifdef ANTLR_CXX_SUPPORTS_NAMESPACE
00054
}
00055
#endif
00056
00057
#endif //INC_ASTPair_hpp__
This file is part of the documentation for KDevelop Version 3.0.4.