Skip to content

Commit

Permalink
🍺 supported ReturnStmt statement
Browse files Browse the repository at this point in the history
  • Loading branch information
shivasurya committed Nov 6, 2024
1 parent d16aca5 commit 836e760
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions sourcecode-parser/graph/java/parse_statement.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ func ParseAssertStatement(node *sitter.Node, sourcecode []byte) *model.AssertStm

func ParseReturnStatement(node *sitter.Node, sourcecode []byte) *model.ReturnStmt {
returnStmt := &model.ReturnStmt{}
if node.Child(0) != nil {
returnStmt.Result = &model.Expr{NodeString: node.Child(0).Content(sourcecode)}
if node.Child(1) != nil {
returnStmt.Result = &model.Expr{NodeString: node.Child(1).Content(sourcecode)}
}
return returnStmt
}

0 comments on commit 836e760

Please sign in to comment.