mirror of
https://github.com/jezhiggins/arabica
synced 2025-01-13 08:01:17 +01:00
changed the handling of RelativeLocationPath token when building a step list. There might be things following the path, and must take them into account. Test position89 exposed a problem prompting this change.
This commit is contained in:
parent
8eec99f4b4
commit
2e1b775e71
1 changed files with 7 additions and 3 deletions
|
@ -5,6 +5,7 @@
|
|||
#include <boost/spirit/tree/ast.hpp>
|
||||
#include <string>
|
||||
#include <stdexcept>
|
||||
#include <algorithm>
|
||||
#include <map>
|
||||
#include "xpath_object.hpp"
|
||||
#include "xpath_expression.hpp"
|
||||
|
@ -728,9 +729,12 @@ impl::StepList<string_type, string_adaptor> XPath<string_type, string_adaptor>::
|
|||
++c;
|
||||
break;
|
||||
case impl::RelativeLocationPath_id:
|
||||
// might get here when handling an absolute path
|
||||
end = c->children.end();
|
||||
c = c->children.begin();
|
||||
{
|
||||
// might get here when handling an absolute path
|
||||
const impl::StepList<string_type, string_adaptor> rel = createStepList(c->children.begin(), c->children.end(), context);
|
||||
std::copy(rel.begin(), rel.end(), std::back_inserter(steps));
|
||||
++c;
|
||||
}
|
||||
break;
|
||||
case impl::Step_id:
|
||||
{
|
||||
|
|
Loading…
Reference in a new issue