Exemple #1
0
 def _validate(self, data):
     if not data.variables:
         raise DataError('FOR loop has no loop variables.')
     for var in data.variables:
         if not is_scalar_var(var):
             raise DataError("Invalid FOR loop variable '%s'." % var)
     if not data.values:
         raise DataError('FOR loop has no loop values.')
     if not data.keywords:
         raise DataError('FOR loop contains no keywords.')
Exemple #2
0
 def _format_arg(self, arg):
     if not is_scalar_var(arg):
         self._raise_invalid_spec("Invalid argument syntax '%s'." % arg)
     return arg[2:-1]
Exemple #3
0
 def _format_arg(self, arg):
     if not is_scalar_var(arg):
         self._raise_invalid_spec("Invalid argument syntax '%s'." % arg)
     return arg[2:-1]