diff options
author | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-08 19:23:17 +0800 |
---|---|---|
committer | Lu Guanqun <guanqun.lu@gmail.com> | 2015-02-10 23:39:13 +0800 |
commit | d307b0914c4425ffbdf312b270a5528868915667 (patch) | |
tree | acd96e9f0412bc57efa78dfeb194ac5edfb68d3c /Scanner.cpp | |
parent | cf4144b70246b53589b3238213f688244485f9b0 (diff) | |
download | dexon-solidity-d307b0914c4425ffbdf312b270a5528868915667.tar.gz dexon-solidity-d307b0914c4425ffbdf312b270a5528868915667.tar.zst dexon-solidity-d307b0914c4425ffbdf312b270a5528868915667.zip |
add exponent operator
https://www.pivotaltracker.com/n/projects/1189488/stories/83746404
Diffstat (limited to 'Scanner.cpp')
-rw-r--r-- | Scanner.cpp | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/Scanner.cpp b/Scanner.cpp index fc4bdb6b..fbe3ea97 100644 --- a/Scanner.cpp +++ b/Scanner.cpp @@ -465,8 +465,14 @@ void Scanner::scanToken() token = Token::Sub; break; case '*': - // * *= - token = selectToken('=', Token::AssignMul, Token::Mul); + // * ** *= + advance(); + if (m_char == '*') + token = selectToken(Token::Exp); + else if (m_char == '=') + token = selectToken(Token::AssignMul); + else + token = Token::Mul; break; case '%': // % %= |