comparison markup/path.py @ 164:1f6cb675a66c trunk

Report error when position predicates are used in XPath expressions (which is NYI).
author cmlenz
date Wed, 16 Aug 2006 23:06:32 +0000
parents 9c023c395e44
children dc6676d3b697
comparison
equal deleted inserted replaced
163:9c023c395e44 164:1f6cb675a66c
357 357
358 def _predicate(self): 358 def _predicate(self):
359 assert self.cur_token == '[' 359 assert self.cur_token == '['
360 self.next_token() 360 self.next_token()
361 expr = self._or_expr() 361 expr = self._or_expr()
362 if isinstance(expr, NumberLiteral):
363 raise PathSyntaxError('Position predicates not yet supported')
362 if self.cur_token != ']': 364 if self.cur_token != ']':
363 raise PathSyntaxError('Expected "]" to close predicate, ' 365 raise PathSyntaxError('Expected "]" to close predicate, '
364 'but found "%s"' % self.cur_token, 366 'but found "%s"' % self.cur_token,
365 self.filename, self.lineno) 367 self.filename, self.lineno)
366 if not self.at_end: 368 if not self.at_end:
Copyright (C) 2012-2017 Edgewall Software