aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity/parsing/Token.h
diff options
context:
space:
mode:
authorRJ Catalano <rcatalano@macsales.com>2016-03-09 01:23:32 +0800
committerchriseth <c@ethdev.com>2016-03-12 00:49:32 +0800
commit67793f1aedab8cae956e8df0eec5e6a99f06b87b (patch)
tree4282fd76d51f39e8293d64a85dad56ca7a9df966 /libsolidity/parsing/Token.h
parent9f5c3977fb0c1a4607a955811ea3cda6e0547b66 (diff)
downloaddexon-solidity-67793f1aedab8cae956e8df0eec5e6a99f06b87b.tar.gz
dexon-solidity-67793f1aedab8cae956e8df0eec5e6a99f06b87b.tar.zst
dexon-solidity-67793f1aedab8cae956e8df0eec5e6a99f06b87b.zip
changed documentation and using lexical cast
Diffstat (limited to 'libsolidity/parsing/Token.h')
-rw-r--r--libsolidity/parsing/Token.h6
1 files changed, 1 insertions, 5 deletions
diff --git a/libsolidity/parsing/Token.h b/libsolidity/parsing/Token.h
index fea80ef7..0e5b594c 100644
--- a/libsolidity/parsing/Token.h
+++ b/libsolidity/parsing/Token.h
@@ -305,11 +305,7 @@ public:
static std::tuple<Token::Value, unsigned short, unsigned short> fromIdentifierOrKeyword(std::string const& _literal);
private:
- // extractUnsigned provides a safe way to extract numbers,
- // if out_of_range error is thrown, they returns 0s, therefore securing
- // the variable's identity as an identifier. If an invalid conversion
- // error is thrown (usually in the case of grabbing N from a fixed type)
- // then a 0 is thrown to purposely ensure that it will declare itself as an identifier
+ // @returns 0 on error (invalid digit or number too large)
static unsigned extractUnsigned(std::string::const_iterator const& _begin, std::string::const_iterator const& _end);
// @returns the keyword with name @a _name or Token::Identifier of no such keyword exists.
static Token::Value keywordByName(std::string const& _name);