parser: Provide nextnext for token rules
Because the indentation rule sometimes needs to look two tokens forward (in case of anchors for instance).
This commit is contained in:
@@ -39,7 +39,8 @@ class IndentationStackTestCase(RuleTestCase):
|
||||
context = {}
|
||||
output = ''
|
||||
for elem in token_generator(source):
|
||||
list(check(conf, elem.curr, elem.prev, elem.next, context))
|
||||
list(check(conf, elem.curr, elem.prev, elem.next, elem.nextnext,
|
||||
context))
|
||||
|
||||
token_type = (elem.curr.__class__.__name__
|
||||
.replace('Token', '')
|
||||
|
||||
Reference in New Issue
Block a user