aboutsummaryrefslogtreecommitdiff
path: root/src/lexer.cpp
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--src/lexer.cpp31
1 files changed, 31 insertions, 0 deletions
diff --git a/src/lexer.cpp b/src/lexer.cpp
new file mode 100644
index 0000000..c7a6fcb
--- /dev/null
+++ b/src/lexer.cpp
@@ -0,0 +1,31 @@
1#include "bu/lexer.h"
2
3Bu::Lexer::Lexer()
4{
5}
6
7Bu::Lexer::~Lexer()
8{
9}
10
11Bu::Lexer::Token::Token() :
12 iToken( -1 )
13{
14}
15
16Bu::Lexer::Token::Token( int iToken ) :
17 iToken( iToken )
18{
19}
20
21Bu::FString Bu::Lexer::tokenToString( const Bu::Lexer::Token &t )
22{
23 Bu::MemBuf mb;
24 Bu::Formatter f( mb );
25 f << "<" << t.iToken << ">";
26 if( t.vExtra.isSet() )
27 f << " (" << t.vExtra << ")";
28
29 return mb.getString();
30}
31