Skip to content

Commit 00ff31c

Browse files
authored
feat: auto build graph (#41)
1 parent 575841c commit 00ff31c

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lang/uniast/node.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ import (
2121

2222
func (r *Repository) GetNode(id Identity) *Node {
2323
key := id.Full()
24+
if r.Graph == nil || len(r.Graph) == 0 {
25+
r.BuildGraph()
26+
}
2427
node, ok := r.Graph[key]
2528
if !ok {
2629
return nil

0 commit comments

Comments
 (0)