-
Notifications
You must be signed in to change notification settings - Fork 5
Syntax Parser Extension
Jaysmito Mukherjee edited this page Nov 8, 2021
·
3 revisions
#include "lexpp.h"
#include "extensions/syntax_parser.h"
std::shared_ptr<lexpp::SyntaxParser> parser = std::make_shared<lexpp::SyntaxParser>(data);
lexpp::lex(parser);
std::cout << std::setfill(' ') << std::left;
std::cout << std::setw(30) << "Token" << std::setw(30) << "Type" << std::endl;
for(lexpp::SyntaxToken& token : parser->get_tokens())
{
std::cout << std::setw(30) << token.value << std::setw(30) << lexpp::to_string(token.type) << std::endl;
}
Thanks for Reading this ❤️ !
If you have questions contact me via discord : https://discord.gg/R9eMZUwxtu