| 234 | } |
| 235 | |
| 236 | func (f *ClauseFilter) parseClause(ClauseRaw string) Clause { |
| 237 | ClauseString := strings.TrimLeft(strings.TrimRight(ClauseRaw, " \r\n\t"), " \r\n\t") |
| 238 | if len(ClauseString) == 0 { |
| 239 | return Clause{clauseType: true_clause} |
| 240 | } |
| 241 | |
| 242 | buf := bytes.NewBufferString(ClauseString) |
| 243 | var ctx sexp.SourceContext |
| 244 | file := ctx.AddFile("clause", 1) |
| 245 | top, _ := sexp.Parse(buf, file) |
| 246 | clause := top.Children |
| 247 | |
| 248 | return f.parseClauseSexp(clause) |
| 249 | } |
| 250 | |
| 251 | func (f *ClauseFilter) matchClause(l baker.Record, clause *Clause) bool { |
| 252 | switch clause.clauseType { |