PacktPublishing / Learn-LLVM-12

Learn LLVM 12, published by Packt
MIT License
471 stars 102 forks source link

fix example #29

Open XDUqinian opened 9 months ago

XDUqinian commented 9 months ago
#define CASE(ch, tok) \
case ch: formToken(token, BufferPtr + 1, tok); break
CASE('+', Token::plus);
CASE('-', Token::minus);
CASE('*', Token::star);
CASE('/', Token::slash);
CASE('(', Token::Token::l_paren);
CASE(')', Token::Token::r_paren);
CASE(':', Token::Token::colon);
CASE(',', Token::Token::comma);
#undef CASE

This is the code in the Lexer::next function in the lexer.cpp in Chapter 03. I think Token::Token::op is something wrong .