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 cms.cython_support cimport *
cdef enum:
MACRO_STACK_SIZE = 64
MACRO_STACK_NAME_SIZE = 32
cdef struct _StackElem:
int64_t lineno
Py_UCS4 name[MACRO_STACK_NAME_SIZE]
cdef class _IndexRef(object):
cdef int64_t charOffset
cdef class _Anchor(object):
cdef str name
cdef str text
cdef int64_t indent
cdef _Bool noIndex
cdef str makeUrl(self, CMSStatementResolver resolver)
cdef class _ArgParserRet(object):
cdef int64_t cons
cdef list arguments
cdef class _ResolverRet(object):
cdef int64_t cons
cdef str data
cdef class CMSStatementResolver(object):
cdef public object cms
cdef public dict variables
cdef public object pageIdent
cdef public uint64_t charCount
cdef public list indexRefs
cdef public list anchors
cdef _StackElem __callStack[MACRO_STACK_SIZE]
cdef uint16_t __callStackLen
cdef list __macroArgs
cdef dict __handlers
cdef str __escapedChars
cdef str VARNAME_CHARS
cdef str expandVariable(self, str name)
cpdef str escape(self, str data)
cpdef str unescape(self, str data)
cdef _ResolverRet __do_compare(self, str d, int64_t dOffs, _Bool invert)
cdef str __do_arith(self, object oper, list args)
cdef _ArgParserRet __parseArguments(self, str d, int64_t dOffs, _Bool strip)
cdef _ResolverRet __doMacro(self, str macroname, str d, int64_t dOffs)
cdef _ResolverRet __expandRecStmts(self, str d, int64_t dOffs, str stopchars)
|