Ejemplo n.º 1
0
def validate_whens(ctx, line_num, whens):
  for when in whens:
    checkF(when.lstrip('!') in ctx.all_whens, '{}: bad when: {}', line_num, when)
Ejemplo n.º 2
0
def validate_keys(line_num, keys):
  for word in keys:
    for el in word.split('+'):
      checkF(key_validator.fullmatch(el), '{}: bad key: {!r}', line_num, el)