tan  0.0.1
parser.h
1 #ifndef TAN_PARSER_H
2 #define TAN_PARSER_H
3 #include "base.h"
4 #include "ast/fwd.h"
5 
6 namespace tanlang {
7 
8 class ParserImpl;
9 class Token;
10 class Program;
11 
12 /**
13  * \brief Top Down Operator Precedence Parsing
14  * \details A parser is bound to a specific tan source file. It does not care about any imported source files.
15  */
16 class Parser final {
17 public:
18  Parser() = delete;
19  explicit Parser(TokenizedSourceFile *src);
20  ~Parser();
21  Program *parse();
22 
23 private:
24  ParserImpl *_impl;
25 };
26 
27 } // namespace tanlang
28 
29 #endif /* TAN_PARSER_H */
Top Down Operator Precedence Parsing.
Definition: parser.h:16
Different from SourceFile, TokenizedSourceFile manages the tokenized text of a source file.