else if (id == PfRule::SUBS)
{
Assert(children.size() > 0);
- Assert(1 <= args.size() && args.size() <= 2);
+ Assert(1 <= args.size() && args.size() <= 3) << "Args: " << args;
MethodId ids = MethodId::SB_DEFAULT;
- if (args.size() == 2 && !getMethodId(args[1], ids))
+ if (args.size() >= 2 && !getMethodId(args[1], ids))
+ {
+ return Node::null();
+ }
+ MethodId ida = MethodId::SBA_SEQUENTIAL;
+ if (args.size() >= 3 && !getMethodId(args[2], ida))
{
return Node::null();
}
{
exp.push_back(children[i]);
}
- Node res = applySubstitution(args[0], exp, ids);
+ Node res = applySubstitution(args[0], exp, ids, ida);
if (res.isNull())
{
return Node::null();