mirror of
https://github.com/ethereum/solidity
synced 2023-10-03 13:03:40 +00:00
Merge pull request #844 from Denton-L/remove-after
BREAKING: Remove after
This commit is contained in:
@@ -306,7 +306,7 @@ TypePointer IntegerType::unaryOperatorResult(Token::Value _operator) const
|
||||
// for non-address integers, we allow +, -, ++ and --
|
||||
else if (_operator == Token::Add || _operator == Token::Sub ||
|
||||
_operator == Token::Inc || _operator == Token::Dec ||
|
||||
_operator == Token::After || _operator == Token::BitNot)
|
||||
_operator == Token::BitNot)
|
||||
return shared_from_this();
|
||||
else
|
||||
return TypePointer();
|
||||
@@ -416,8 +416,7 @@ TypePointer FixedPointType::unaryOperatorResult(Token::Value _operator) const
|
||||
_operator == Token::Add ||
|
||||
_operator == Token::Sub ||
|
||||
_operator == Token::Inc ||
|
||||
_operator == Token::Dec ||
|
||||
_operator == Token::After
|
||||
_operator == Token::Dec
|
||||
)
|
||||
return shared_from_this();
|
||||
else
|
||||
|
||||
@@ -297,9 +297,6 @@ bool ExpressionCompiler::visit(UnaryOperation const& _unaryOperation)
|
||||
case Token::BitNot: // ~
|
||||
m_context << Instruction::NOT;
|
||||
break;
|
||||
case Token::After: // after
|
||||
m_context << Instruction::TIMESTAMP << Instruction::ADD;
|
||||
break;
|
||||
case Token::Delete: // delete
|
||||
solAssert(!!m_currentLValue, "LValue not retrieved.");
|
||||
m_currentLValue->setToZero(_unaryOperation.location());
|
||||
|
||||
@@ -56,7 +56,7 @@ VariableDefinition = VariableDeclaration ( '=' Expression )?
|
||||
// Precedence by order (see github.com/ethereum/solidity/pull/732)
|
||||
Expression =
|
||||
( Expression ('++' | '--') | FunctionCall | IndexAccess | MemberAccess | '(' Expression ')' )
|
||||
| ('!' | '~' | 'after' | 'delete' | '++' | '--' | '+' | '-') Expression
|
||||
| ('!' | '~' | 'delete' | '++' | '--' | '+' | '-') Expression
|
||||
| Expression '**' Expression
|
||||
| Expression ('*' | '/' | '%') Expression
|
||||
| Expression ('+' | '-') Expression
|
||||
|
||||
@@ -185,7 +185,6 @@ namespace solidity
|
||||
K(SubDay, "days", 0) \
|
||||
K(SubWeek, "weeks", 0) \
|
||||
K(SubYear, "years", 0) \
|
||||
K(After, "after", 0) \
|
||||
/* type keywords*/ \
|
||||
K(Int, "int", 0) \
|
||||
K(UInt, "uint", 0) \
|
||||
@@ -215,6 +214,7 @@ namespace solidity
|
||||
T(Identifier, NULL, 0) \
|
||||
\
|
||||
/* Keywords reserved for future use. */ \
|
||||
K(After, "after", 0) \
|
||||
K(As, "as", 0) \
|
||||
K(Case, "case", 0) \
|
||||
K(Catch, "catch", 0) \
|
||||
@@ -277,7 +277,7 @@ public:
|
||||
|
||||
static bool isBitOp(Value op) { return (BitOr <= op && op <= BitAnd) || op == BitNot; }
|
||||
static bool isBooleanOp(Value op) { return (Or <= op && op <= And) || op == Not; }
|
||||
static bool isUnaryOp(Value op) { return (Not <= op && op <= Delete) || op == Add || op == Sub || op == After; }
|
||||
static bool isUnaryOp(Value op) { return (Not <= op && op <= Delete) || op == Add || op == Sub; }
|
||||
static bool isCountOp(Value op) { return op == Inc || op == Dec; }
|
||||
static bool isShiftOp(Value op) { return (SHL <= op) && (op <= SHR); }
|
||||
static bool isVisibilitySpecifier(Value op) { return isVariableVisibilitySpecifier(op) || op == External; }
|
||||
|
||||
Reference in New Issue
Block a user