File: Scanning.pxd

package info (click to toggle)
cython 0.21.1-1
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 23,804 kB
  • ctags: 31,405
  • sloc: python: 55,862; ansic: 8,318; xml: 1,031; cpp: 777; makefile: 383; lisp: 206; sh: 7
file content (56 lines) | stat: -rw-r--r-- 1,747 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
from __future__ import absolute_import

import cython

from ..Plex.Scanners cimport Scanner

cdef class Method:
    cdef object name
    cdef object __name__

@cython.final
cdef class CompileTimeScope:
    cdef public dict entries
    cdef public CompileTimeScope outer
    cdef declare(self, name, value)
    cdef lookup_here(self, name)
    cpdef lookup(self, name)

@cython.final
cdef class PyrexScanner(Scanner):
    cdef public context
    cdef public list included_files
    cdef public CompileTimeScope compile_time_env
    cdef public bint compile_time_eval
    cdef public bint compile_time_expr
    cdef public bint parse_comments
    cdef public bint in_python_file
    cdef public source_encoding
    cdef set keywords
    cdef public list indentation_stack
    cdef public indentation_char
    cdef public int bracket_nesting_level
    cdef public sy
    cdef public systring

    cdef long current_level(self)
    #cpdef commentline(self, text)
    #cpdef open_bracket_action(self, text)
    #cpdef close_bracket_action(self, text)
    #cpdef newline_action(self, text)
    #cpdef begin_string_action(self, text)
    #cpdef end_string_action(self, text)
    #cpdef unclosed_string_action(self, text)
    @cython.locals(current_level=cython.long, new_level=cython.long)
    cpdef indentation_action(self, text)
    #cpdef eof_action(self, text)
    cdef next(self)
    cdef peek(self)
    #cpdef put_back(self, sy, systring)
    #cdef unread(self, token, value)
    cdef bint expect(self, what, message = *) except -2
    cdef expect_keyword(self, what, message = *)
    cdef expected(self, what, message = *)
    cdef expect_indent(self)
    cdef expect_dedent(self)
    cdef expect_newline(self, message=*, bint ignore_semicolon=*)