Skip to content

Commit

Permalink
1. 修复代码生成AST时一个数组越界bug;
Browse files Browse the repository at this point in the history
2. 修复build_runner生成代码的一个拼写错误;
  • Loading branch information
paozhuanyinyu committed Nov 6, 2021
1 parent 7fadcac commit e6d6a1d
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dart2dsl/lib/fairdsl/fair_ast_check_gen.dart
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ class AstNodeMapGenerator extends GeneratorForAnnotation<AstNodeCheck> {
return null;
}
for(var body in bodyList){
if(body.isClassDeclaration && body.asClassDeclaration.name =='MyAstVisitor')
if(body.isClassDeclaration && body.asClassDeclaration.name =='CustomAstVisitor')
{
if((body.asClassDeclaration.body?.length??0)>0){

Expand Down
2 changes: 1 addition & 1 deletion dart2dsl/lib/fairdsl/fair_ast_node.dart
Original file line number Diff line number Diff line change
Expand Up @@ -1024,7 +1024,7 @@ class VariableExpression extends AstNode {
List<String> expressions = ast['expression'].toString().split(' ');
var expression = ast['expression'];
if (expressions != null && expressions.length > 0) {
expression = expressions[1];
expression = expressions[0];
}
return VariableExpression(expression, ast: ast);
}
Expand Down

0 comments on commit e6d6a1d

Please sign in to comment.