aboutsummaryrefslogtreecommitdiffstats
path: root/Token.h
diff options
context:
space:
mode:
authorChristian <c@ethdev.com>2015-02-03 00:24:09 +0800
committerChristian <c@ethdev.com>2015-02-03 00:24:09 +0800
commite157364fe8d52d36dd5b6bbf15355da33fcbcc19 (patch)
tree70bcbe71f2738bd6e41541fb8d7920f6c09c9717 /Token.h
parentadce36ff583389819638218e2a11c0887b35282c (diff)
downloaddexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar.gz
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar.bz2
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar.lz
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar.xz
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.tar.zst
dexon-solidity-e157364fe8d52d36dd5b6bbf15355da33fcbcc19.zip
Visibility specifiers.
Diffstat (limited to 'Token.h')
-rw-r--r--Token.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Token.h b/Token.h
index ed42f90c..76e50449 100644
--- a/Token.h
+++ b/Token.h
@@ -165,6 +165,7 @@ namespace solidity
K(NEW, "new", 0) \
K(PUBLIC, "public", 0) \
K(PRIVATE, "private", 0) \
+ K(PROTECTED, "protected", 0) \
K(RETURN, "return", 0) \
K(RETURNS, "returns", 0) \
K(STRUCT, "struct", 0) \
@@ -376,6 +377,7 @@ public:
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 op == PUBLIC || op == PRIVATE || op == PROTECTED; }
// Returns a string corresponding to the JS token string
// (.e., "<" for the token LT) or NULL if the token doesn't