mirror of
https://gitee.com/BDWare/common
synced 2025-01-09 17:34:16 +00:00
feat: sharable var integration
This commit is contained in:
parent
3bf508b088
commit
5598a2ba8c
@ -122,7 +122,8 @@ public class ContractReader extends YJSParserBaseVisitor<ContractNode> {
|
||||
SharableDeclarationContext sharableCtx = clzOrFunction.sharableDeclaration();
|
||||
sharableCtx.sharableStatement().variableDeclarationList();
|
||||
SharableReader reader = new SharableReader(fileName);
|
||||
SharableNode sharable = reader.visitVariableDeclarationList(sharableCtx.sharableStatement().variableDeclarationList());
|
||||
SharableNode sharable = reader.visitVariableDeclarationList(
|
||||
sharableCtx.sharableStatement().variableDeclarationList());
|
||||
node.addSharable(sharable);
|
||||
}
|
||||
}
|
||||
|
@ -18,7 +18,8 @@ public class SharableReader extends YJSParserBaseVisitor<SharableNode> {
|
||||
public SharableNode visitVariableDeclarationList(YJSParser.VariableDeclarationListContext ctx) {
|
||||
SharableNode sharableNode = new SharableNode();
|
||||
List<String> statements = new ArrayList<>();
|
||||
for (YJSParser.VariableDeclarationContext variableDeclarationContext : ctx.variableDeclaration()) {
|
||||
for (YJSParser.VariableDeclarationContext variableDeclarationContext : ctx
|
||||
.variableDeclaration()) {
|
||||
statements.add(variableDeclarationContext.getText());
|
||||
}
|
||||
sharableNode.setVariableStatements(statements);
|
||||
|
Loading…
Reference in New Issue
Block a user