mapres 3.dev10__tar.gz → 3.dev12__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {mapres-3.dev10/src/mapres.egg-info → mapres-3.dev12}/PKG-INFO +1 -1
- {mapres-3.dev10 → mapres-3.dev12}/pyproject.toml +1 -1
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/tokenizer.py +0 -19
- {mapres-3.dev10 → mapres-3.dev12/src/mapres.egg-info}/PKG-INFO +1 -1
- {mapres-3.dev10 → mapres-3.dev12}/LICENSE +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/README.md +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/setup.cfg +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/__init__.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/ast.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/cache.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/datamap.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/evaluator.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/exceptions.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/layers.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/maps/__init__.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/maps/color.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/maps/time.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/parser.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres/resolver.py +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres.egg-info/SOURCES.txt +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres.egg-info/dependency_links.txt +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres.egg-info/requires.txt +0 -0
- {mapres-3.dev10 → mapres-3.dev12}/src/mapres.egg-info/top_level.txt +0 -0
|
@@ -4,25 +4,18 @@ from enum import Enum, auto
|
|
|
4
4
|
class TokenType(Enum):
|
|
5
5
|
TEXT = auto()
|
|
6
6
|
IDENT = auto()
|
|
7
|
-
|
|
8
7
|
COLON_OPEN = auto()
|
|
9
8
|
COLON_CLOSE = auto()
|
|
10
|
-
|
|
11
9
|
BRACE_OPEN = auto()
|
|
12
10
|
BRACE_CLOSE = auto()
|
|
13
|
-
|
|
14
11
|
DOLLAR_OPEN = auto()
|
|
15
12
|
DOLLAR_CLOSE = auto()
|
|
16
|
-
|
|
17
13
|
ANGLE_OPEN = auto()
|
|
18
14
|
ANGLE_CLOSE = auto()
|
|
19
|
-
|
|
20
15
|
PIPE_OPEN = auto()
|
|
21
16
|
PIPE_CLOSE = auto()
|
|
22
|
-
|
|
23
17
|
PERCENT_OPEN = auto()
|
|
24
18
|
PERCENT_CLOSE = auto()
|
|
25
|
-
|
|
26
19
|
LPAREN = auto()
|
|
27
20
|
RPAREN = auto()
|
|
28
21
|
|
|
@@ -45,8 +38,6 @@ class Tokenizer:
|
|
|
45
38
|
self.i = 0
|
|
46
39
|
self.n = len(text)
|
|
47
40
|
self.tokens = []
|
|
48
|
-
|
|
49
|
-
# state for single-char paired delimiters
|
|
50
41
|
self.in_pipe = False
|
|
51
42
|
self.in_percent = False
|
|
52
43
|
self.in_colon = False
|
|
@@ -77,7 +68,6 @@ class Tokenizer:
|
|
|
77
68
|
while self.i < self.n:
|
|
78
69
|
ch = self.peek()
|
|
79
70
|
|
|
80
|
-
# ESCAPES
|
|
81
71
|
if self.match(r'\:'):
|
|
82
72
|
buf.append(':'); self.advance(2); continue
|
|
83
73
|
if self.match(r'\<'):
|
|
@@ -99,7 +89,6 @@ class Tokenizer:
|
|
|
99
89
|
if self.match(r'\)'):
|
|
100
90
|
buf.append(')'); self.advance(2); continue
|
|
101
91
|
|
|
102
|
-
# DOUBLE BRACES {{value}}
|
|
103
92
|
if self.match("{{"):
|
|
104
93
|
flush_text()
|
|
105
94
|
self.emit(TokenType.BRACE_OPEN)
|
|
@@ -112,7 +101,6 @@ class Tokenizer:
|
|
|
112
101
|
self.advance(2)
|
|
113
102
|
continue
|
|
114
103
|
|
|
115
|
-
# DOLLARS ${value}
|
|
116
104
|
if self.match("${"):
|
|
117
105
|
flush_text()
|
|
118
106
|
self.emit(TokenType.DOLLAR_OPEN)
|
|
@@ -125,7 +113,6 @@ class Tokenizer:
|
|
|
125
113
|
self.advance()
|
|
126
114
|
continue
|
|
127
115
|
|
|
128
|
-
# ANGLES <value>
|
|
129
116
|
if self.match("<"):
|
|
130
117
|
flush_text()
|
|
131
118
|
self.emit(TokenType.ANGLE_OPEN)
|
|
@@ -138,7 +125,6 @@ class Tokenizer:
|
|
|
138
125
|
self.advance()
|
|
139
126
|
continue
|
|
140
127
|
|
|
141
|
-
# PIPES |value|
|
|
142
128
|
if self.match("|"):
|
|
143
129
|
flush_text()
|
|
144
130
|
if not self.in_pipe:
|
|
@@ -150,7 +136,6 @@ class Tokenizer:
|
|
|
150
136
|
self.advance()
|
|
151
137
|
continue
|
|
152
138
|
|
|
153
|
-
# PERCENTS %value%
|
|
154
139
|
if self.match("%"):
|
|
155
140
|
flush_text()
|
|
156
141
|
if not self.in_percent:
|
|
@@ -162,7 +147,6 @@ class Tokenizer:
|
|
|
162
147
|
self.advance()
|
|
163
148
|
continue
|
|
164
149
|
|
|
165
|
-
# COLONS :value:
|
|
166
150
|
if self.match(":"):
|
|
167
151
|
flush_text()
|
|
168
152
|
if not self.in_colon:
|
|
@@ -174,7 +158,6 @@ class Tokenizer:
|
|
|
174
158
|
self.advance()
|
|
175
159
|
continue
|
|
176
160
|
|
|
177
|
-
# PARENTHESES
|
|
178
161
|
if ch == "(":
|
|
179
162
|
flush_text()
|
|
180
163
|
self.emit(TokenType.LPAREN)
|
|
@@ -187,7 +170,6 @@ class Tokenizer:
|
|
|
187
170
|
self.advance()
|
|
188
171
|
continue
|
|
189
172
|
|
|
190
|
-
# IDENTIFIERS (with dots)
|
|
191
173
|
if ch.isalpha():
|
|
192
174
|
flush_text()
|
|
193
175
|
start = self.i
|
|
@@ -197,7 +179,6 @@ class Tokenizer:
|
|
|
197
179
|
self.emit(TokenType.IDENT, ident)
|
|
198
180
|
continue
|
|
199
181
|
|
|
200
|
-
# DEFAULT: TEXT
|
|
201
182
|
buf.append(ch)
|
|
202
183
|
self.advance()
|
|
203
184
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|