You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ast/source_unit.go
+20Lines changed: 20 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -24,6 +24,7 @@ type SourceUnit[T NodeType] struct {
24
24
AbsolutePathstring`json:"absolutePath"`// AbsolutePath is the absolute path of the source unit.
25
25
Namestring`json:"name"`// Name is the name of the source unit. This is going to be one of the following: contract, interface or library name. It's here for convenience.
26
26
NodeType ast_pb.NodeType`json:"nodeType"`// NodeType is the type of the AST node.
27
+
Kind ast_pb.NodeType`json:"kind"`// Kind is the type of the AST node (contract, library, interface).
27
28
Nodes []Node[NodeType] `json:"nodes"`// Nodes is the list of AST nodes.
28
29
SrcSrcNode`json:"src"`// Src is the source code location.
29
30
}
@@ -107,6 +108,11 @@ func (s *SourceUnit[T]) GetType() ast_pb.NodeType {
0 commit comments