Skip to content

Commit

Permalink
Support storage slots
Browse files Browse the repository at this point in the history
  • Loading branch information
thorvald committed Jun 7, 2019
1 parent 6e89628 commit e0fb3c5
Show file tree
Hide file tree
Showing 8 changed files with 1,864 additions and 1,754 deletions.
2 changes: 1 addition & 1 deletion .gitmodules
@@ -1,3 +1,3 @@
[submodule "solidity-antlr4"]
path = solidity-antlr4
url = https://github.com/solidityj/solidity-antlr4
url = https://github.com/BeamNetwork/solidity-antlr4.git
34 changes: 17 additions & 17 deletions lib/grammar/Solidity.tokens
Expand Up @@ -139,23 +139,23 @@ LINE_COMMENT=119
'is'=20
'('=21
')'=22
'using'=23
'for'=24
'struct'=25
'constructor'=26
'modifier'=27
'function'=28
'returns'=29
'event'=30
'enum'=31
'['=32
']'=33
'address'=34
'.'=35
'mapping'=36
'=>'=37
'memory'=38
'storage'=39
'storage'=23
'['=24
']'=25
'using'=26
'for'=27
'struct'=28
'constructor'=29
'modifier'=30
'function'=31
'returns'=32
'event'=33
'enum'=34
'address'=35
'.'=36
'mapping'=37
'=>'=38
'memory'=39
'calldata'=40
'if'=41
'else'=42
Expand Down
524 changes: 261 additions & 263 deletions lib/grammar/SolidityLexer.js

Large diffs are not rendered by default.

34 changes: 17 additions & 17 deletions lib/grammar/SolidityLexer.tokens
Expand Up @@ -139,23 +139,23 @@ LINE_COMMENT=119
'is'=20
'('=21
')'=22
'using'=23
'for'=24
'struct'=25
'constructor'=26
'modifier'=27
'function'=28
'returns'=29
'event'=30
'enum'=31
'['=32
']'=33
'address'=34
'.'=35
'mapping'=36
'=>'=37
'memory'=38
'storage'=39
'storage'=23
'['=24
']'=25
'using'=26
'for'=27
'struct'=28
'constructor'=29
'modifier'=30
'function'=31
'returns'=32
'event'=33
'enum'=34
'address'=35
'.'=36
'mapping'=37
'=>'=38
'memory'=39
'calldata'=40
'if'=41
'else'=42
Expand Down
9 changes: 9 additions & 0 deletions lib/grammar/SolidityListener.js
Expand Up @@ -119,6 +119,15 @@ SolidityListener.prototype.exitContractPart = function(ctx) {
};


// Enter a parse tree produced by SolidityParser#storageSlot.
SolidityListener.prototype.enterStorageSlot = function(ctx) {
};

// Exit a parse tree produced by SolidityParser#storageSlot.
SolidityListener.prototype.exitStorageSlot = function(ctx) {
};


// Enter a parse tree produced by SolidityParser#stateVariableDeclaration.
SolidityListener.prototype.enterStateVariableDeclaration = function(ctx) {
};
Expand Down
3,010 changes: 1,556 additions & 1,454 deletions lib/grammar/SolidityParser.js

Large diffs are not rendered by default.

3 changes: 2 additions & 1 deletion lib/rules/miscellaneous/index.js
@@ -1,5 +1,6 @@
const QuotesChecker = require('./quotes')
const StorageConsistencyChecker = require('./storage-consistency.js')

module.exports = function checkers(reporter, config) {
return [new QuotesChecker(reporter, config)]
return [new QuotesChecker(reporter, config), new StorageConsistencyChecker(reporter, config)]
}
2 changes: 1 addition & 1 deletion solidity-antlr4

0 comments on commit e0fb3c5

Please sign in to comment.