Alien-SmokeQt

 view release on metacpan or  search on metacpan

generator/parser/parser.h  view on Meta::CPAN

  void moveComments( CommentAST* ast );

  void advance(bool skipComment = true);
  void rewind(size_t position);
  // private:
  TokenStream* token_stream;

// private:
  Control *control;
  Lexer lexer;
private:
  
  enum TokenMarkers {
    None = 0,
    IsNoTemplateArgumentList = 1
  };
  
  TokenMarkers tokenMarkers(size_t tokenNumber) const;
  void addTokenMarkers(size_t tokenNumber, TokenMarkers markers);


  int lineFromTokenNumber( size_t tokenNumber ) const;

  void clear();
  
  ///parses all comments until the end of the line
  Comment comment();
  ///Preparses comments in the same line as given token-number
  void preparseLineComments( int tokenNumber );
  void processComment( int offset = 0, int line = -1 );
  void clearComment( );

  bool holdErrors(bool hold);
  void reportPendingErrors();

  Comment m_currentComment;
  CommentStore m_commentStore;
 
  hash_map<size_t, TokenMarkers> m_tokenMarkers;
  int _M_problem_count;
  int _M_max_problem_count;
  ParseSession* session;
  bool _M_hold_errors;
  size_t _M_last_valid_token; //Last encountered token that was not a comment
  size_t _M_last_parsed_comment;
  
  bool _M_hadMismatchingCompoundTokens;
  bool m_primaryExpressionWithTemplateParamsNeedsFunctionCall;

  // keeps track of tokens where a syntax error has been found
  // so that the same error is not reported twice for a token
  QSet<std::size_t> m_syntaxErrorTokens;

  // when _M_hold_errors is true, reported errors are held in m_pendingErrors
  // rather than being reported to the Control immediately.
  //
  // this is used, for example, when parsing ambiguous statements.
  struct PendingError
  {
   QString message;
   std::size_t cursor;
  };
  QQueue<PendingError> m_pendingErrors;

private:
  Parser(const Parser& source);
  void operator = (const Parser& source);
};

#endif



( run in 1.046 second using v1.01-cache-2.11-cpan-524268b4103 )