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:
Adrien Vergé
2016-02-03 21:48:11 +01:00
parent 62fa4cbe39
commit 48c7d65c54
14 changed files with 23 additions and 18 deletions

View File

@@ -73,7 +73,7 @@ CONF = {'min-spaces-inside': int,
'max-spaces-inside': int}
def check(conf, token, prev, next, context):
def check(conf, token, prev, next, nextnext, context):
if isinstance(token, yaml.FlowMappingStartToken):
problem = spaces_after(token, prev, next,
min=conf['min-spaces-inside'],