User Guide
lexer.cpp File Reference
#include <string>
#include <catch2/catch_test_macros.hpp>
#include "lexer/unit_lexer.hpp"
#include "parser/unit_driver.hpp"

Go to the source code of this file.

Typedefs

using Token = UnitParser::token
 
using TokenType = UnitParser::token_type
 
using SymbolType = UnitParser::symbol_type
 

Functions

bool check_token_type (const std::string &name, TokenType type)
 retrieve token type from lexer and check if it's of given type More...
 
 TEST_CASE ("Unit Lexer tests for valid tokens", "[lexer][unit]")
 

Typedef Documentation

◆ SymbolType

Definition at line 22 of file lexer.cpp.

◆ Token

using Token = UnitParser::token

Definition at line 20 of file lexer.cpp.

◆ TokenType

using TokenType = UnitParser::token_type

Definition at line 21 of file lexer.cpp.

Function Documentation

◆ check_token_type()

bool check_token_type ( const std::string &  name,
TokenType  type 
)

retrieve token type from lexer and check if it's of given type

Definition at line 25 of file lexer.cpp.

◆ TEST_CASE()

TEST_CASE ( "Unit Lexer tests for valid tokens"  ,
""  [lexer][unit] 
)

Definition at line 35 of file lexer.cpp.