MCPcopy Create free account
hub / github.com/araddon/qlbridge / FromPB

Method FromPB

expr/node.go:808–822  ·  view source on GitHub ↗
(n *NodePb)

Source from the content-addressed store, hash-verified

806 return &NodePb{Sn: n}
807}
808func (m *StringNode) FromPB(n *NodePb) Node {
809 noQuote := false
810 quote := 0
811 if n.Sn.Noquote != nil {
812 noQuote = *n.Sn.Noquote
813 }
814 if n.Sn.Quote != nil {
815 quote = int(*n.Sn.Quote)
816 }
817 return &StringNode{
818 noQuote: noQuote,
819 Text: n.Sn.Text,
820 Quote: byte(quote),
821 }
822}
823func (m *StringNode) Expr() *Expr {
824 return &Expr{Value: m.Text}
825}

Callers 1

NodeFromNodePbFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected