py2_token.py 339 B

12345678910
  1. from spark_parser.scanner import GenericToken
  2. class PythonToken(GenericToken):
  3. def __init__(self, kind, attr, line, column):
  4. self.kind = kind
  5. self.attr = attr
  6. self.line = line
  7. self.column = column
  8. def __str__(self):
  9. return 'L%d.%d: %s: %r' % (self.line, self.column, self.kind, self.attr)