summaryrefslogtreecommitdiff
path: root/src/shared/cplusplus/AST.h
diff options
context:
space:
mode:
authorThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-05-11 16:34:35 +0200
committerThorbjørn Lindeijer <thorbjorn.lindeijer@nokia.com>2009-05-11 17:03:51 +0200
commitecc2b25ddcdf3567907643df8d1b7a3512a58392 (patch)
tree5bc9bbf78858425d472dffa893995c59deed98ef /src/shared/cplusplus/AST.h
parent36a94b69b12e458a99b12067e8220f541fcdeb39 (diff)
downloadqt-creator-ecc2b25ddcdf3567907643df8d1b7a3512a58392.tar.gz
Extended the AST with references to more tokens
Mainly comma tokens. Referencing all tokens is necessary to be able to implement pretty-printing based on the AST while maintaining user formatting. Reviewed-by: Roberto Raggi
Diffstat (limited to 'src/shared/cplusplus/AST.h')
-rw-r--r--src/shared/cplusplus/AST.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/shared/cplusplus/AST.h b/src/shared/cplusplus/AST.h
index 44d5cd695a..960c90921c 100644
--- a/src/shared/cplusplus/AST.h
+++ b/src/shared/cplusplus/AST.h
@@ -265,6 +265,7 @@ public:
ExpressionListAST *expression_list;
unsigned rparen_token;
AttributeAST *next;
+ unsigned comma_token;
public:
virtual AttributeAST *asAttribute()
@@ -283,7 +284,9 @@ class CPLUSPLUS_EXPORT TypeofSpecifierAST: public SpecifierAST
{
public:
unsigned typeof_token;
+ unsigned lparen_token;
ExpressionAST *expression;
+ unsigned rparen_token;
public:
virtual TypeofSpecifierAST *asTypeofSpecifier()
@@ -359,6 +362,7 @@ public:
CoreDeclaratorAST *core_declarator;
PostfixDeclaratorAST *postfix_declarators;
SpecifierAST *attributes;
+ unsigned equals_token;
ExpressionAST *initializer;
public:
@@ -377,6 +381,7 @@ protected:
class CPLUSPLUS_EXPORT ExpressionListAST: public ExpressionAST
{
public:
+ unsigned comma_token;
ExpressionAST *expression;
ExpressionListAST *next;
@@ -482,6 +487,7 @@ protected:
class CPLUSPLUS_EXPORT BaseSpecifierAST: public AST
{
public:
+ unsigned comma_token;
unsigned token_virtual;
unsigned token_access_specifier;
NameAST *name;
@@ -847,6 +853,7 @@ protected:
class CPLUSPLUS_EXPORT DeclaratorListAST: public AST
{
public:
+ unsigned comma_token;
DeclaratorAST *declarator;
DeclaratorListAST *next;
@@ -971,6 +978,7 @@ protected:
class CPLUSPLUS_EXPORT EnumeratorAST: public AST
{
public:
+ unsigned comma_token;
unsigned identifier_token;
unsigned equal_token;
ExpressionAST *expression;
@@ -1229,6 +1237,7 @@ protected:
class CPLUSPLUS_EXPORT MemInitializerAST: public AST
{
public:
+ unsigned comma_token;
NameAST *name;
unsigned lparen_token;
ExpressionAST *expression;
@@ -2073,6 +2082,7 @@ protected:
class CPLUSPLUS_EXPORT TemplateArgumentListAST: public AST
{
public:
+ unsigned comma_token;
ExpressionAST *template_argument;
TemplateArgumentListAST *next;