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

Method Expr

expr/node.go:1054–1066  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

1052 return &IdentityNode{Text: n.In.Text, Quote: byte(*q)}
1053}
1054func (m *IdentityNode) Expr() *Expr {
1055 if m.IsBooleanIdentity() {
1056 return &Expr{Value: m.Text}
1057 }
1058
1059 if m.HasLeftRight() {
1060 if IdentityMaybeQuote('`', m.left) != m.left {
1061 //u.Warnf("This will NOT round-trip l:%q r:%q original:%q text:%q", m.left, m.right, m.original, m.Text)
1062 }
1063 return &Expr{Identity: fmt.Sprintf("%s.%s", m.left, m.right)}
1064 }
1065 return &Expr{Identity: m.Text}
1066}
1067func (m *IdentityNode) FromExpr(e *Expr) error {
1068 if len(e.Identity) > 0 {
1069 m.Text = e.Identity

Callers

nothing calls this directly

Calls 3

IsBooleanIdentityMethod · 0.95
HasLeftRightMethod · 0.95
IdentityMaybeQuoteFunction · 0.85

Tested by

no test coverage detected