MCPcopy
hub / github.com/google/mangle / Doc

Method Doc

ast/decl.go:95–111  ·  view source on GitHub ↗

Doc returns the doc strings from the Decl's description atoms.

()

Source from the content-addressed store, hash-verified

93
94// Doc returns the doc strings from the Decl's description atoms.
95func (d Decl) Doc() []string {
96 var res []string
97 d.findDescr(DescrDoc, func(a Atom) {
98 for _, arg := range a.Args {
99 c, ok := arg.(Constant)
100 if !ok {
101 return
102 }
103 str, err := c.StringValue()
104 if err != nil {
105 return
106 }
107 res = append(res, str)
108 }
109 })
110 return res
111}
112
113// IsExtensional returns true if decl is for an extensional predicate.
114func (d Decl) IsExtensional() bool {

Callers 1

showPredicateMethod · 0.80

Calls 2

findDescrMethod · 0.95
StringValueMethod · 0.80

Tested by

no test coverage detected