Skip to content

Commit

Permalink
GoLang : Array returning null handling (#23)
Browse files Browse the repository at this point in the history
* null array handling

* scalafmt

* add missing import
  • Loading branch information
khemrajrathore authored Jun 6, 2024
1 parent 8ec8227 commit 940b860
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ import overflowdb.BatchedUpdate.DiffGraphBuilder
import ujson.Value

import scala.collection.mutable
import scala.collection.mutable.ArrayBuffer

class AstCreator(
val relPathFileName: String,
Expand Down Expand Up @@ -72,7 +73,8 @@ class AstCreator(
val methodReturn = methodReturnNode(rootNode, Defines.anyTypeName)
val declsAsts = rootNode
.json(ParserKeys.Decls)
.arr
.arrOpt
.getOrElse(ArrayBuffer.empty)
.flatMap { item =>
val node = createParserNodeInfo(item)
astForNode(node, true)
Expand Down

0 comments on commit 940b860

Please sign in to comment.