aboutsummaryrefslogtreecommitdiffstats
path: root/Types.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2014-12-06 09:19:10 +0800
committerChristian <c@ethdev.com>2014-12-08 19:53:56 +0800
commit13640d7db82562592958fcce2d7ce8155cc7ea35 (patch)
treea27fc38d8fb642ad602d875e3218542adb533de5 /Types.h
parentc78c330634997e5d8e2ec27db9e3d9cf50bae230 (diff)
downloaddexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.gz
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.bz2
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.lz
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.xz
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.tar.zst
dexon-solidity-13640d7db82562592958fcce2d7ce8155cc7ea35.zip
Clear separation between ASTVisitor and ASTConstVisitor and more const specifiers.
Diffstat (limited to 'Types.h')
-rw-r--r--Types.h12
1 files changed, 6 insertions, 6 deletions
diff --git a/Types.h b/Types.h
index b655f9e0..42ead008 100644
--- a/Types.h
+++ b/Types.h
@@ -80,15 +80,15 @@ public:
///@{
///@name Factory functions
/// Factory functions that convert an AST @ref TypeName to a Type.
- static std::shared_ptr<Type> fromElementaryTypeName(Token::Value _typeToken);
- static std::shared_ptr<Type> fromUserDefinedTypeName(UserDefinedTypeName const& _typeName);
- static std::shared_ptr<Type> fromMapping(Mapping const& _typeName);
- static std::shared_ptr<Type> fromFunction(FunctionDefinition const& _function);
+ static std::shared_ptr<Type const> fromElementaryTypeName(Token::Value _typeToken);
+ static std::shared_ptr<Type const> fromUserDefinedTypeName(UserDefinedTypeName const& _typeName);
+ static std::shared_ptr<Type const> fromMapping(Mapping const& _typeName);
+ static std::shared_ptr<Type const> fromFunction(FunctionDefinition const& _function);
/// @}
/// Auto-detect the proper type for a literal. @returns an empty pointer if the literal does
/// not fit any type.
- static std::shared_ptr<Type> forLiteral(Literal const& _literal);
+ static std::shared_ptr<Type const> forLiteral(Literal const& _literal);
virtual Category getCategory() const = 0;
virtual bool isImplicitlyConvertibleTo(Type const& _other) const { return *this == _other; }
@@ -148,7 +148,7 @@ public:
/// @returns the smallest integer type for the given literal or an empty pointer
/// if no type fits.
- static std::shared_ptr<IntegerType> smallestTypeForLiteral(std::string const& _literal);
+ static std::shared_ptr<IntegerType const> smallestTypeForLiteral(std::string const& _literal);
explicit IntegerType(int _bits, Modifier _modifier = Modifier::UNSIGNED);