Skip to content

Commit

Permalink
fix tests
Browse files Browse the repository at this point in the history
  • Loading branch information
gravataLonga committed Aug 3, 2022
1 parent 300d842 commit de86ff8
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions semantic/syntax_direct_translation.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,9 @@ func New(node ast.Node) *Semantic {
}

func (s *Semantic) Analysis() ast.Node {
return s.analysis(s.program)
return analysis(s.program)
}

func analysis(node ast.Node) ast.Node {
switch node := node.(type) {
case *ast.Program:
for i, stmt := range node.Statements {
node.Statements[i] = analysis(stmt)
}
return node
}
return node
}

0 comments on commit de86ff8

Please sign in to comment.