diff options
author | chriseth <chris@ethereum.org> | 2018-09-10 19:00:03 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 19:00:03 +0800 |
commit | b9164eaba2a192428a27bac045c529c438599af7 (patch) | |
tree | bdc128a766c64667537ddfe8fbe9bea55025aaea /libsolidity/parsing/Scanner.h | |
parent | a1848ac9470a97bf2f158b91a558391ee9f70c11 (diff) | |
parent | 55e4532c7231ea7f4ab54402ebac84406564b64b (diff) | |
download | dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar.gz dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar.bz2 dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar.lz dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar.xz dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.tar.zst dexon-solidity-b9164eaba2a192428a27bac045c529c438599af7.zip |
Merge pull request #4937 from ethereum/fixNewline_0425
[backport] Fix newline bugs
Diffstat (limited to 'libsolidity/parsing/Scanner.h')
-rw-r--r-- | libsolidity/parsing/Scanner.h | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/libsolidity/parsing/Scanner.h b/libsolidity/parsing/Scanner.h index 0adaa6fd..602532e4 100644 --- a/libsolidity/parsing/Scanner.h +++ b/libsolidity/parsing/Scanner.h @@ -197,8 +197,8 @@ private: /// Skips all whitespace and @returns true if something was skipped. bool skipWhitespace(); - /// Skips all whitespace except Line feeds and returns true if something was skipped - bool skipWhitespaceExceptLF(); + /// Skips all whitespace that are neither '\r' nor '\n'. + void skipWhitespaceExceptUnicodeLinebreak(); Token::Value skipSingleLineComment(); Token::Value skipMultiLineComment(); @@ -218,6 +218,9 @@ private: /// is scanned. bool scanEscape(); + /// @returns true iff we are currently positioned at a unicode line break. + bool isUnicodeLinebreak(); + /// Return the current source position. int sourcePos() const { return m_source.position(); } bool isSourcePastEndOfInput() const { return m_source.isPastEndOfInput(); } |