dshellInterpreter 0.2.15.1__py3-none-any.whl → 0.2.15.2__py3-none-any.whl
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.
Potentially problematic release.
This version of dshellInterpreter might be problematic. Click here for more details.
- Dshell/_DshellInterpreteur/dshell_interpreter.py +10 -4
- {dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/METADATA +1 -1
- {dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/RECORD +6 -6
- {dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/WHEEL +0 -0
- {dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/licenses/LICENSE +0 -0
- {dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/top_level.txt +0 -0
|
@@ -162,14 +162,14 @@ class DshellInterpreteur:
|
|
|
162
162
|
elif isinstance(first_node, LengthNode):
|
|
163
163
|
self.env[node.name.value] = length(first_node)
|
|
164
164
|
|
|
165
|
+
elif isinstance(first_node, IdentOperationNode):
|
|
166
|
+
self.env[node.name.value] = self.eval_ident_operation(first_node)
|
|
167
|
+
|
|
165
168
|
else:
|
|
166
169
|
self.env[node.name.value] = eval_expression(node.body, self)
|
|
167
170
|
|
|
168
171
|
elif isinstance(node, IdentOperationNode):
|
|
169
|
-
|
|
170
|
-
listNode = self.eval_data_token(node.ident)
|
|
171
|
-
if hasattr(listNode, function):
|
|
172
|
-
getattr(listNode, function)(self.eval_data_token(node.args))
|
|
172
|
+
return self.eval_ident_operation(node)
|
|
173
173
|
|
|
174
174
|
elif isinstance(node, SleepNode):
|
|
175
175
|
sleep_time = eval_expression(node.body, self)
|
|
@@ -217,6 +217,12 @@ class DshellInterpreteur:
|
|
|
217
217
|
else:
|
|
218
218
|
return token.value # fallback
|
|
219
219
|
|
|
220
|
+
def eval_ident_operation(self, node: IdentOperationNode) -> Optional[Any]:
|
|
221
|
+
function = self.eval_data_token(node.function)
|
|
222
|
+
listNode = self.eval_data_token(node.ident)
|
|
223
|
+
if hasattr(listNode, function):
|
|
224
|
+
return getattr(listNode, function)(self.eval_data_token(node.args))
|
|
225
|
+
return None
|
|
220
226
|
|
|
221
227
|
def get_params(node: ParamNode, interpreter: DshellInterpreteur) -> dict[str, Any]:
|
|
222
228
|
"""
|
|
@@ -11,7 +11,7 @@ Dshell/DISCORD_COMMANDS/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5N
|
|
|
11
11
|
Dshell/DISCORD_COMMANDS/utils/utils_message.py,sha256=cQvJ15f49ddOjybARwkJKNFe3ITYQciF-pZHERFPkr0,2964
|
|
12
12
|
Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-eIFUigDSJfK9mT1ww,1457
|
|
13
13
|
Dshell/_DshellInterpreteur/__init__.py,sha256=xy5-J-R3YmY99JF3NBHTRRLsComFxpjnCA5xacISctU,35
|
|
14
|
-
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=
|
|
14
|
+
Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=I22N3R0eH0mK9KlepbUcvqP4YOmTCcSZdI5_CyIsy34,32716
|
|
15
15
|
Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
|
|
16
16
|
Dshell/_DshellParser/ast_nodes.py,sha256=X7kw5nflGCi_h4FWlK5vytedR70Mwarj5NbhpaqYao4,19643
|
|
17
17
|
Dshell/_DshellParser/dshell_parser.py,sha256=YUFfBbFQ1ApOCyVhx-0nJ6S6W5MOBG6YabbkM43BKVw,21708
|
|
@@ -19,8 +19,8 @@ Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8q
|
|
|
19
19
|
Dshell/_DshellTokenizer/dshell_keywords.py,sha256=7oeSKLXCsPRpyU31skCerOUMzd2cdm-GwofpmgTPkD0,5961
|
|
20
20
|
Dshell/_DshellTokenizer/dshell_token_type.py,sha256=gYIb2XN2YcgeRgmar_rBDS5CGmwfmxihu8mOW_d6lbE,1533
|
|
21
21
|
Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=RrJA2XpcFH2vS6SnRIn5Own_uL5orIDvpq74t8xD3og,7350
|
|
22
|
-
dshellinterpreter-0.2.15.
|
|
23
|
-
dshellinterpreter-0.2.15.
|
|
24
|
-
dshellinterpreter-0.2.15.
|
|
25
|
-
dshellinterpreter-0.2.15.
|
|
26
|
-
dshellinterpreter-0.2.15.
|
|
22
|
+
dshellinterpreter-0.2.15.2.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
|
|
23
|
+
dshellinterpreter-0.2.15.2.dist-info/METADATA,sha256=3QaELBxioT7TBr87RxJNDV_g0WP9wxLxcCUyC7uGB8A,1151
|
|
24
|
+
dshellinterpreter-0.2.15.2.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
25
|
+
dshellinterpreter-0.2.15.2.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
|
|
26
|
+
dshellinterpreter-0.2.15.2.dist-info/RECORD,,
|
|
File without changes
|
{dshellinterpreter-0.2.15.1.dist-info → dshellinterpreter-0.2.15.2.dist-info}/licenses/LICENSE
RENAMED
|
File without changes
|
|
File without changes
|