Skip to content

Commit

Permalink
Merge pull request #119 from solidity-parser/add-transient-storage
Browse files Browse the repository at this point in the history
Add support for transient storage variables
  • Loading branch information
fvictorio authored Nov 13, 2024
2 parents b965d3b + 305ae73 commit f51e1f8
Show file tree
Hide file tree
Showing 13 changed files with 1,936 additions and 1,858 deletions.
2 changes: 1 addition & 1 deletion antlr
Submodule antlr updated 2 files
+2 −1 Solidity.g4
+25 −0 test.sol
6 changes: 6 additions & 0 deletions src/ASTBuilder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,11 @@ export class ASTBuilder
isImmutable = true
}

let isTransient = false
if (ctx.TransientKeyword_list().length > 0) {
isTransient = true
}

const decl: AST.StateVariableDeclarationVariable = {
type: 'VariableDeclaration',
typeName: type,
Expand All @@ -120,6 +125,7 @@ export class ASTBuilder
isDeclaredConst,
isIndexed: false,
isImmutable,
isTransient,
override,
storageLocation: null,
}
Expand Down
4 changes: 3 additions & 1 deletion src/antlr/Solidity.interp

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions src/antlr/Solidity.tokens

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion src/antlr/SolidityLexer.interp

Large diffs are not rendered by default.

82 changes: 42 additions & 40 deletions src/antlr/SolidityLexer.tokens

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit f51e1f8

Please sign in to comment.