More documentation for the Lexer

This commit is contained in:
apio 2022-06-08 20:06:56 +02:00
parent 073a97c7b6
commit 09064b1581

View File

@ -10,6 +10,7 @@ typedef std::vector<Token> TokenStream;
/* The number of data types currently in Sapphire. */ /* The number of data types currently in Sapphire. */
#define TYPE_COUNT 14 #define TYPE_COUNT 14
/* The Lexer for the Sapphire compiler. A Lexer reads source code from a file, and turns it into a stream of tokens the compiler can understand. */
class Lexer class Lexer
{ {
private: private:
@ -38,7 +39,7 @@ private:
public: public:
/* An array containing Sapphire's current data types. */ /* An array containing Sapphire's current data types. */
static const std::array<std::string,TYPE_COUNT> types; static const std::array<std::string,TYPE_COUNT> types;
~Lexer(); ~Lexer();
/* Lex the given text, turning it into a stream of tokens. */ /* Lex the given text, turning it into a stream of tokens. */