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:
@@ -84,7 +84,7 @@ TYPE = 'token'
|
||||
CONF = {'present': bool}
|
||||
|
||||
|
||||
def check(conf, token, prev, next, context):
|
||||
def check(conf, token, prev, next, nextnext, context):
|
||||
if conf['present']:
|
||||
if (isinstance(token, yaml.StreamEndToken) and
|
||||
not (isinstance(prev, yaml.DocumentEndToken) or
|
||||
|
||||
Reference in New Issue
Block a user