@solidity-parser/parser
Advanced tools
Comparing version 0.14.2-beta.0 to 0.14.2-beta.1
@@ -56,2 +56,3 @@ import { ParseTreeListener } from "antlr4ts/tree/ParseTreeListener"; | ||
import { InlineAssemblyStatementContext } from "./SolidityParser"; | ||
import { InlineAssemblyStatementFlagContext } from "./SolidityParser"; | ||
import { DoWhileStatementContext } from "./SolidityParser"; | ||
@@ -647,2 +648,12 @@ import { ContinueStatementContext } from "./SolidityParser"; | ||
/** | ||
* Enter a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
*/ | ||
enterInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => void; | ||
/** | ||
* Exit a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
*/ | ||
exitInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => void; | ||
/** | ||
* Enter a parse tree produced by `SolidityParser.doWhileStatement`. | ||
@@ -649,0 +660,0 @@ * @param ctx the parse tree |
@@ -56,2 +56,3 @@ import { ParseTreeVisitor } from "antlr4ts/tree/ParseTreeVisitor"; | ||
import { InlineAssemblyStatementContext } from "./SolidityParser"; | ||
import { InlineAssemblyStatementFlagContext } from "./SolidityParser"; | ||
import { DoWhileStatementContext } from "./SolidityParser"; | ||
@@ -434,2 +435,8 @@ import { ContinueStatementContext } from "./SolidityParser"; | ||
/** | ||
* Visit a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
* @return the visitor result | ||
*/ | ||
visitInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => Result; | ||
/** | ||
* Visit a parse tree produced by `SolidityParser.doWhileStatement`. | ||
@@ -436,0 +443,0 @@ * @param ctx the parse tree |
@@ -214,2 +214,3 @@ interface Location { | ||
language: string | null; | ||
flags: string[]; | ||
body: AssemblyBlock; | ||
@@ -216,0 +217,0 @@ } |
{ | ||
"name": "@solidity-parser/parser", | ||
"version": "0.14.2-beta.0", | ||
"version": "0.14.2-beta.1", | ||
"description": "A Solidity parser built from a robust ANTLR 4 grammar", | ||
@@ -5,0 +5,0 @@ "main": "dist/index.cjs.js", |
@@ -60,2 +60,3 @@ // Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT | ||
import { InlineAssemblyStatementContext } from "./SolidityParser"; | ||
import { InlineAssemblyStatementFlagContext } from "./SolidityParser"; | ||
import { DoWhileStatementContext } from "./SolidityParser"; | ||
@@ -707,2 +708,13 @@ import { ContinueStatementContext } from "./SolidityParser"; | ||
/** | ||
* Enter a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
*/ | ||
enterInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => void; | ||
/** | ||
* Exit a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
*/ | ||
exitInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => void; | ||
/** | ||
* Enter a parse tree produced by `SolidityParser.doWhileStatement`. | ||
@@ -709,0 +721,0 @@ * @param ctx the parse tree |
@@ -60,2 +60,3 @@ // Generated from antlr/Solidity.g4 by ANTLR 4.9.0-SNAPSHOT | ||
import { InlineAssemblyStatementContext } from "./SolidityParser"; | ||
import { InlineAssemblyStatementFlagContext } from "./SolidityParser"; | ||
import { DoWhileStatementContext } from "./SolidityParser"; | ||
@@ -494,2 +495,9 @@ import { ContinueStatementContext } from "./SolidityParser"; | ||
/** | ||
* Visit a parse tree produced by `SolidityParser.inlineAssemblyStatementFlag`. | ||
* @param ctx the parse tree | ||
* @return the visitor result | ||
*/ | ||
visitInlineAssemblyStatementFlag?: (ctx: InlineAssemblyStatementFlagContext) => Result; | ||
/** | ||
* Visit a parse tree produced by `SolidityParser.doWhileStatement`. | ||
@@ -496,0 +504,0 @@ * @param ctx the parse tree |
@@ -307,2 +307,3 @@ // Base on the original type definitions for solidity-parser-antlr 0.2 | ||
language: string | null | ||
flags: string[] | ||
body: AssemblyBlock | ||
@@ -309,0 +310,0 @@ } |
@@ -1620,5 +1620,13 @@ import { ParserRuleContext } from 'antlr4ts' | ||
const flags = [] | ||
const flag = ctx.inlineAssemblyStatementFlag() | ||
if (flag !== undefined) { | ||
const flagString = this._toText(flag.stringLiteral()) | ||
flags.push(flagString.slice(1, flagString.length - 1)) | ||
} | ||
const node: AST.InlineAssemblyStatement = { | ||
type: 'InlineAssemblyStatement', | ||
language, | ||
flags, | ||
body: this.visitAssemblyBlock(ctx.assemblyBlock()), | ||
@@ -1625,0 +1633,0 @@ } |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
9253966
98877