restyleing

removed unnecessary check
This commit is contained in:
Liana Husikyan 2015-03-16 14:45:11 +01:00
parent ebb4d5e298
commit 27a89a36e1
2 changed files with 9 additions and 11 deletions

17
AST.h
View File

@ -443,14 +443,15 @@ class VariableDeclaration: public Declaration
{ {
public: public:
VariableDeclaration( VariableDeclaration(
SourceLocation const& _location, SourceLocation const& _location,
ASTPointer<TypeName> const& _type, ASTPointer<TypeName> const& _type,
ASTPointer<ASTString> const& _name, ASTPointer<ASTString> const& _name,
ASTPointer<Expression> _value, ASTPointer<Expression> _value,
Visibility _visibility, Visibility _visibility,
bool _isStateVar = false, bool _isStateVar = false,
bool _isIndexed = false, bool _isIndexed = false,
bool _isConstant = false): bool _isConstant = false
):
Declaration(_location, _name, _visibility), Declaration(_location, _name, _visibility),
m_typeName(_type), m_typeName(_type),
m_value(_value), m_value(_value),

View File

@ -330,9 +330,6 @@ ASTPointer<VariableDeclaration> Parser::parseVariableDeclaration(
} }
if (token == Token::Const) if (token == Token::Const)
{ {
solAssert(_options.isStateVariable, "");
if (m_scanner->peekNextToken() != Token::Identifier && !Token::isElementaryTypeName(m_scanner->peekNextToken()))
BOOST_THROW_EXCEPTION(createParserError("Invalid use of \"constant\" specifier"));
isDeclaredConst = true; isDeclaredConst = true;
m_scanner->next(); m_scanner->next();
} }