diff options
author | chriseth <chris@ethereum.org> | 2018-09-10 18:25:07 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-09-10 18:25:07 +0800 |
commit | 255eda2ea69cf1996b1d6e1289b47f394ae28712 (patch) | |
tree | 5d31eabb82ab01dd541c7fb8648f0b92917bbee4 /libsolidity/parsing/Scanner.h | |
parent | 86d8502598c6f6dc3a5c7a5fa21e56dbbfc09d8c (diff) | |
parent | 4fb4846d1fd8d3ab8867ba6bc2ccd17ab5d353f7 (diff) | |
download | dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar.gz dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar.bz2 dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar.lz dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar.xz dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.tar.zst dexon-solidity-255eda2ea69cf1996b1d6e1289b47f394ae28712.zip |
Merge pull request #4912 from ethereum/fixNewline
Fix bugs in comments.
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 8a3011eb..7564c788 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(); } |