Show More
@@ -107,6 +107,11 b' def notset(mctx, x):' | |||||
107 | s = set(getset(mctx, x)) |
|
107 | s = set(getset(mctx, x)) | |
108 | return [r for r in mctx.subset if r not in s] |
|
108 | return [r for r in mctx.subset if r not in s] | |
109 |
|
109 | |||
|
110 | def minusset(mctx, x, y): | |||
|
111 | xl = getset(mctx, x) | |||
|
112 | yl = set(getset(mctx, y)) | |||
|
113 | return [f for f in xl if f not in yl] | |||
|
114 | ||||
110 | def listset(mctx, a, b): |
|
115 | def listset(mctx, a, b): | |
111 | raise error.ParseError(_("can't use a list in this context")) |
|
116 | raise error.ParseError(_("can't use a list in this context")) | |
112 |
|
117 | |||
@@ -406,6 +411,7 b' methods = {' | |||||
406 | 'symbol': stringset, |
|
411 | 'symbol': stringset, | |
407 | 'and': andset, |
|
412 | 'and': andset, | |
408 | 'or': orset, |
|
413 | 'or': orset, | |
|
414 | 'minus': minusset, | |||
409 | 'list': listset, |
|
415 | 'list': listset, | |
410 | 'group': getset, |
|
416 | 'group': getset, | |
411 | 'not': notset, |
|
417 | 'not': notset, |
General Comments 0
You need to be logged in to leave comments.
Login now