Index: tools/gn/parser.h |
diff --git a/tools/gn/parser.h b/tools/gn/parser.h |
index 407b472081cbd052f55c88d88f2d5907f61d4acb..a82f1c09a00c511b5ea7903d6d23551a09bd203a 100644 |
--- a/tools/gn/parser.h |
+++ b/tools/gn/parser.h |
@@ -73,6 +73,14 @@ class Parser { |
scoped_ptr<BlockNode> ParseBlock(); |
scoped_ptr<ParseNode> ParseCondition(); |
+ // Generates a pre- and post-order traversal of the tree. |
+ void TraverseOrder(const ParseNode* root, |
+ std::vector<const ParseNode*>* pre, |
+ std::vector<const ParseNode*>* post); |
+ |
+ // Attach comments to nearby syntax. |
+ void AssignComments(ParseNode* file); |
+ |
bool IsAssignment(const ParseNode* node) const; |
bool IsStatementBreak(Token::Type token_type) const; |
@@ -90,7 +98,9 @@ class Parser { |
bool at_end() const { return cur_ >= tokens_.size(); } |
bool has_error() const { return err_->has_error(); } |
- const std::vector<Token>& tokens_; |
+ std::vector<Token> tokens_; |
+ std::vector<Token> line_comment_tokens_; |
+ std::vector<Token> suffix_comment_tokens_; |
static ParserHelper expressions_[Token::NUM_TYPES]; |