aboutsummaryrefslogtreecommitdiffstats
path: root/libsolidity
diff options
context:
space:
mode:
authorchriseth <chris@ethereum.org>2016-08-12 21:09:55 +0800
committerGitHub <noreply@github.com>2016-08-12 21:09:55 +0800
commit0d894a6832d21ba68f0f3d2fea66c8f4efc45815 (patch)
tree79d06aa3333b9921fbb99e1cecd56dd3ef595df7 /libsolidity
parent08248ff4edca83c2edc57a4f081002cd2bb393a4 (diff)
parent92a711c4fb0f84186aeab955150a733bb1293aae (diff)
downloaddexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar.gz
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar.bz2
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar.lz
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar.xz
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.tar.zst
dexon-solidity-0d894a6832d21ba68f0f3d2fea66c8f4efc45815.zip
Merge pull request #844 from Denton-L/remove-after
BREAKING: Remove after
Diffstat (limited to 'libsolidity')
-rw-r--r--libsolidity/ast/Types.cpp5
-rw-r--r--libsolidity/codegen/ExpressionCompiler.cpp3
-rw-r--r--libsolidity/grammar.txt2
-rw-r--r--libsolidity/parsing/Token.h4
4 files changed, 5 insertions, 9 deletions
diff --git a/libsolidity/ast/Types.cpp b/libsolidity/ast/Types.cpp
index 28f7e1b7..d86a2caf 100644
--- a/libsolidity/ast/Types.cpp
+++ b/libsolidity/ast/Types.cpp
@@ -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
diff --git a/libsolidity/codegen/ExpressionCompiler.cpp b/libsolidity/codegen/ExpressionCompiler.cpp
index 80009a90..1d574556 100644
--- a/libsolidity/codegen/ExpressionCompiler.cpp
+++ b/libsolidity/codegen/ExpressionCompiler.cpp
@@ -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());
diff --git a/libsolidity/grammar.txt b/libsolidity/grammar.txt
index 6d92fc59..0d1f68a6 100644
--- a/libsolidity/grammar.txt
+++ b/libsolidity/grammar.txt
@@ -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
diff --git a/libsolidity/parsing/Token.h b/libsolidity/parsing/Token.h
index 581df3a5..5ac7aedd 100644
--- a/libsolidity/parsing/Token.h
+++ b/libsolidity/parsing/Token.h
@@ -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; }