|
picceler
|
Lexical analyzer for the picceler programming language. More...
#include <lexer.h>
Public Member Functions | |
| Lexer () | |
| Constructs a Lexer. | |
| void | setSourceString (std::string_view source) |
| Sets the source string for the lexer. | |
| Result< void > | setSource (const std::string &filepath) |
| Sets the source file for the lexer. | |
| Result< Token > | nextToken () |
| Returns the next token from the input. | |
| Result< Token > | peekToken () |
| Returns the next token without advancing the input. | |
| void | skipWhitespaceAndComment () |
| Skips whitespace characters and comment lines in the input. | |
| Result< std::vector< Token > > | getTokens () |
| Tokenizes the entire input. | |
Lexical analyzer for the picceler programming language.
| picceler::Lexer::Lexer | ( | ) |
Constructs a Lexer.
Tokenizes the entire input.
Returns the next token from the input.
Returns the next token without advancing the input.
| Result< void > picceler::Lexer::setSource | ( | const std::string & | filepath | ) |
Sets the source file for the lexer.
| filepath | The source file to read from. |
| void picceler::Lexer::setSourceString | ( | std::string_view | source | ) |
Sets the source string for the lexer.
| source | The source string to read from. |
| void picceler::Lexer::skipWhitespaceAndComment | ( | ) |
Skips whitespace characters and comment lines in the input.