aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing
diff options
context:
space:
mode:
authorAlex Beregszaszi <alex@rtfs.hu>2017-08-17 08:14:15 +0800
committerAlex Beregszaszi <alex@rtfs.hu>2017-08-22 17:51:46 +0800
commite2cfc9ee92158169b5dd058074f25d67959e9875 (patch)
tree90cb281b48f95bdcc9904ed12def22bffcb88fb7 /libsolidity/parsing
parentc94b1f81730c27480cb5813a7a909511613c14c5 (diff)
downloaddexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.tar.gz
dexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.tar.zst
dexon-solidity-e2cfc9ee92158169b5dd058074f25d67959e9875.zip
Mark a lot of functions const (where possible)
Diffstat (limited to 'libsolidity/parsing')
-rw-r--r--libsolidity/parsing/Scanner.h10
1 files changed, 5 insertions, 5 deletions
diff --git a/libsolidity/parsing/Scanner.h b/libsolidity/parsing/Scanner.h
index d6b48c6f..0adaa6fd 100644
--- a/libsolidity/parsing/Scanner.h
+++ b/libsolidity/parsing/Scanner.h
@@ -75,7 +75,7 @@ public:
int position() const { return m_position; }
bool isPastEndOfInput(size_t _charsForward = 0) const { return (m_position + _charsForward) >= m_source.size(); }
char get(size_t _charsForward = 0) const { return m_source[m_position + _charsForward]; }
- char advanceAndGet(size_t _chars=1);
+ char advanceAndGet(size_t _chars = 1);
char rollback(size_t _amount);
void reset() { m_position = 0; }
@@ -118,11 +118,11 @@ public:
///@name Information about the current token
/// @returns the current token
- Token::Value currentToken()
+ Token::Value currentToken() const
{
return m_currentToken.token;
}
- ElementaryTypeNameToken currentElementaryTypeNameToken()
+ ElementaryTypeNameToken currentElementaryTypeNameToken() const
{
unsigned firstSize;
unsigned secondSize;
@@ -219,8 +219,8 @@ private:
bool scanEscape();
/// Return the current source position.
- int sourcePos() { return m_source.position(); }
- bool isSourcePastEndOfInput() { return m_source.isPastEndOfInput(); }
+ int sourcePos() const { return m_source.position(); }
+ bool isSourcePastEndOfInput() const { return m_source.isPastEndOfInput(); }
TokenDesc m_skippedComment; // desc for current skipped comment
TokenDesc m_nextSkippedComment; // desc for next skiped comment