Doc returns the doc strings from the Decl's description atoms.
()
| 93 | |
| 94 | // Doc returns the doc strings from the Decl's description atoms. |
| 95 | func (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. |
| 114 | func (d Decl) IsExtensional() bool { |
no test coverage detected