|
sammine-lang
|
A Lexer class with holds the core functionality Tokens and Token streams. More...
#include <Lexer.h>


Public Member Functions | |
| Lexer (const std::string &input) | |
| std::shared_ptr< Token > | peek () |
| std::shared_ptr< Token > | consume () |
| std::shared_ptr< TokenStream > | getTokenStream () |
| size_t | advance (size_t i) |
| size_t | devance (size_t i) |
Public Member Functions inherited from sammine_util::Reportee | |
| iterator | begin () |
| iterator | end () |
| const_iterator | begin () const |
| const_iterator | end () const |
| const_iterator | cbegin () const |
| const_iterator | cend () const |
| virtual void | abort (const std::string &msg="<NO MESSAGE>") |
| template<explicitly_bool_like T> | |
| void | abort_on (const T &condition, const std::string &message="<NO MESSAGE>") |
| template<explicitly_bool_like T> | |
| void | abort_if_not (const T &condition, const std::string &message="<NO MESSAGE>") |
| void | add_error (Location loc, std::string msg) |
| void | add_warn (Location loc, std::string msg) |
| void | add_diagnostics (Location loc, std::string msg) |
| virtual bool | has_errors () const |
| bool | has_warn () const |
| bool | has_message () const |
| bool | has_diagnostics () const |
| int64_t | get_error_count () const |
| int64_t | get_warn_count () const |
| int64_t | get_diagnostic_count () const |
Additional Inherited Members | |
Public Types inherited from sammine_util::Reportee | |
| enum | ReportKind { error , warn , diag } |
| using | Report = std::tuple<Location, std::string, ReportKind> |
| using | iterator = std::vector<Report>::iterator |
| using | const_iterator = std::vector<Report>::const_iterator |
Protected Attributes inherited from sammine_util::Reportee | |
| std::vector< Report > | reports |
| int64_t | error_count = 0 |
| int64_t | warn_count = 0 |
| int64_t | diag_count = 0 |