Stax
Programming language
Loading...
Searching...
No Matches
tokens.hpp
Go to the documentation of this file.
1
#pragma once
2
3
#include <boost/describe.hpp>
4
#include <string_view>
5
6
namespace
stax::token
{
7
8
BOOST_DEFINE_ENUM
(Type, kIllegal, kEOF, kIdent, kLet, kFn, kInt, kAssign,
9
kPlus, kComma, kSemicolon, kLParen, kRParen, kLBrace, kRBrace)
10
11
struct
Token {
12
Type type;
13
std::string_view view;
14
15
auto
operator==(
const
Token&)
const
->
bool
=
default
;
16
};
17
18
BOOST_DESCRIBE_STRUCT
(Token, (), (type, view));
19
20
}
// namespace stax
stax::token
Definition
tokens.hpp:6
stax::token::BOOST_DEFINE_ENUM
BOOST_DEFINE_ENUM(Type, kIllegal, kEOF, kIdent, kLet, kFn, kInt, kAssign, kPlus, kComma, kSemicolon, kLParen, kRParen, kLBrace, kRBrace) struct Token
Definition
tokens.hpp:8
stax::token::BOOST_DESCRIBE_STRUCT
BOOST_DESCRIBE_STRUCT(Token,(),(type, view))
staxlib
include
stax
lexer
tokens.hpp
Generated by
1.10.0