/
thomas-king
/
Expression
Обзор
Документация
Войти
/
thomas-king
/
Expression
Код
Запросы
0
Задачи
Вики
Пакеты
0
Релизы
0
CI/CD
Аналитика
Безопасность
main
include/Lexer/Parser.h
30 строк
525 B
AceRodstin
Update Lexer::Parser
25 ноя 2022, 15:37
25 ноя 2022, 15:37
0fb5f55
Код
Авторство
О чём код?
// // Created by Ace Rodstin on 16 Nov 2022. // #ifndef LEXER_PARSER_H #define LEXER_PARSER_H #include <optional> #include "Token.h" #include "../Ace.h" using namespace std; namespace Lexer { class Parser { public: vector<Token> parse(const string &source_code); private: Token create_token(string lexem); bool is_literal(string lexem); bool is_identifier(string lexem); optional<Ace::Literal> parse_literal(string lexem); optional<string> parse_identifier(string lexem); }; } #endif //LEXER_PARSER_H