Scanning.pxd 2.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. from __future__ import absolute_import
  2. import cython
  3. from ..Plex.Scanners cimport Scanner
  4. cdef unicode any_string_prefix, IDENT
  5. cdef get_lexicon()
  6. cdef initial_compile_time_env()
  7. cdef class Method:
  8. cdef object name
  9. cdef dict kwargs
  10. cdef readonly object __name__ # for tracing the scanner
  11. @cython.final
  12. cdef class CompileTimeScope:
  13. cdef public dict entries
  14. cdef public CompileTimeScope outer
  15. cdef declare(self, name, value)
  16. cdef lookup_here(self, name)
  17. cpdef lookup(self, name)
  18. @cython.final
  19. cdef class PyrexScanner(Scanner):
  20. cdef public context
  21. cdef public list included_files
  22. cdef public CompileTimeScope compile_time_env
  23. cdef public bint compile_time_eval
  24. cdef public bint compile_time_expr
  25. cdef public bint parse_comments
  26. cdef public bint in_python_file
  27. cdef public source_encoding
  28. cdef set keywords
  29. cdef public list indentation_stack
  30. cdef public indentation_char
  31. cdef public int bracket_nesting_level
  32. cdef bint async_enabled
  33. cdef public sy
  34. cdef public systring
  35. cdef long current_level(self)
  36. #cpdef commentline(self, text)
  37. #cpdef open_bracket_action(self, text)
  38. #cpdef close_bracket_action(self, text)
  39. #cpdef newline_action(self, text)
  40. #cpdef begin_string_action(self, text)
  41. #cpdef end_string_action(self, text)
  42. #cpdef unclosed_string_action(self, text)
  43. @cython.locals(current_level=cython.long, new_level=cython.long)
  44. cpdef indentation_action(self, text)
  45. #cpdef eof_action(self, text)
  46. cdef next(self)
  47. cdef peek(self)
  48. #cpdef put_back(self, sy, systring)
  49. #cdef unread(self, token, value)
  50. cdef bint expect(self, what, message = *) except -2
  51. cdef expect_keyword(self, what, message = *)
  52. cdef expected(self, what, message = *)
  53. cdef expect_indent(self)
  54. cdef expect_dedent(self)
  55. cdef expect_newline(self, message=*, bint ignore_semicolon=*)
  56. cdef int enter_async(self) except -1
  57. cdef int exit_async(self) except -1