mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Support Unicode escape characters in string literals ('\uUUUU')
Fixes #638
This commit is contained in:
@@ -175,6 +175,7 @@ private:
|
||||
inline void addLiteralChar(char c) { m_nextToken.literal.push_back(c); }
|
||||
inline void addCommentLiteralChar(char c) { m_nextSkippedComment.literal.push_back(c); }
|
||||
inline void addLiteralCharAndAdvance() { addLiteralChar(m_char); advance(); }
|
||||
void addUnicodeChar(unsigned codepoint);
|
||||
///@}
|
||||
|
||||
bool advance() { m_char = m_source.advanceAndGet(); return !m_source.isPastEndOfInput(); }
|
||||
@@ -185,6 +186,7 @@ private:
|
||||
inline Token::Value selectToken(char _next, Token::Value _then, Token::Value _else);
|
||||
|
||||
bool scanHexByte(char& o_scannedByte);
|
||||
bool scanUnicode(unsigned& o_codepoint);
|
||||
|
||||
/// Scans a single Solidity token.
|
||||
void scanToken();
|
||||
|
||||
Reference in New Issue
Block a user