specialize-patch: Generalized a pattern.

git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@3188 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
Bart Van Assche
2011-01-05 13:12:14 +00:00
parent 562a0f7ea3
commit e40875d9b9

View File

@@ -207,10 +207,10 @@ function evaluate(stmnt, pattern, arg, op, result) {
stmnt = "+#if " (op[1] == 0 ? op[2] : op[1])
}
pattern="\\(([01])[ ]*\\|\\|[ ]*(!*[ ]*defined[ ]*\\([ ]*[A-Za-z_]*[ ]*\\))\\)$"
pattern="\\(([01])[ ]*\\|\\|[ ]*(!*[ ]*defined[ ]*\\([ ]*[A-Za-z_]*[ ]*\\))\\)"
while (match(stmnt, pattern, op) != 0)
{
stmnt = "+#if " (op[1] == 0 ? op[2] : op[1])
sub(pattern, op[1] == 0 ? op[2] : op[1], stmnt)
}
pattern="\\((-*[0-9]+)\\)"