(n *NodePb)
| 806 | return &NodePb{Sn: n} |
| 807 | } |
| 808 | func (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 | } |
| 823 | func (m *StringNode) Expr() *Expr { |
| 824 | return &Expr{Value: m.Text} |
| 825 | } |