dshellInterpreter 0.2.18.7__tar.gz → 0.2.19.0__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.
Potentially problematic release.
This version of dshellInterpreter might be problematic. Click here for more details.
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellInterpreteur/dshell_interpreter.py +3 -3
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellParser/dshell_parser.py +2 -2
- {dshellinterpreter-0.2.18.7/dshellInterpreter.egg-info → dshellinterpreter-0.2.19.0}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0/dshellInterpreter.egg-info}/PKG-INFO +1 -1
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/setup.py +1 -1
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_channel.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_interaction.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_member.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_message.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_role.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_global.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_list.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_member.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_message.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_permissions.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_string.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/utils_thread.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellInterpreteur/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellInterpreteur/errors.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellParser/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellParser/ast_nodes.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/dshell_keywords.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/dshell_token_type.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/dshell_tokenizer.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/__init__.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_utils.py +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/LICENSE +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/README.md +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/SOURCES.txt +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/dependency_links.txt +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/requires.txt +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/top_level.txt +0 -0
- {dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/setup.cfg +0 -0
|
@@ -223,7 +223,7 @@ class DshellInterpreteur:
|
|
|
223
223
|
return self.env[token.value]
|
|
224
224
|
return token.value
|
|
225
225
|
elif token.type == DTT.EVAL_GROUP:
|
|
226
|
-
await self.execute(token.value)
|
|
226
|
+
await self.execute(parse([token.value], StartNode([]))[0]) # obliger de parser car ce il n'est pas dejà un AST
|
|
227
227
|
return self.env['__ret__']
|
|
228
228
|
elif token.type == DTT.STR:
|
|
229
229
|
for match in findall(rf"\$({'|'.join(self.env.keys())})", token.value):
|
|
@@ -302,12 +302,12 @@ async def eval_expression(tokens: list[Token], interpreter: DshellInterpreteur)
|
|
|
302
302
|
:param tokens: A list of tokens representing the expression.
|
|
303
303
|
:param interpreter: The Dshell interpreter instance.
|
|
304
304
|
"""
|
|
305
|
-
postfix = to_postfix(tokens)
|
|
305
|
+
postfix = to_postfix(tokens, interpreter)
|
|
306
306
|
stack = []
|
|
307
307
|
|
|
308
308
|
for token in postfix:
|
|
309
309
|
|
|
310
|
-
if token.type in {DTT.INT, DTT.FLOAT, DTT.BOOL, DTT.STR, DTT.LIST, DTT.IDENT}:
|
|
310
|
+
if token.type in {DTT.INT, DTT.FLOAT, DTT.BOOL, DTT.STR, DTT.LIST, DTT.IDENT, DTT.EVAL_GROUP}:
|
|
311
311
|
stack.append(await interpreter.eval_data_token(token))
|
|
312
312
|
|
|
313
313
|
elif token.type in (DTT.MATHS_OPERATOR, DTT.LOGIC_OPERATOR, DTT.LOGIC_WORD_OPERATOR):
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellParser/dshell_parser.py
RENAMED
|
@@ -318,7 +318,7 @@ def parser_inline(tokens: list[Token]) -> tuple[list[list[Token]], bool]:
|
|
|
318
318
|
return result, True
|
|
319
319
|
|
|
320
320
|
|
|
321
|
-
def to_postfix(expression):
|
|
321
|
+
def to_postfix(expression, interpreter=None):
|
|
322
322
|
"""
|
|
323
323
|
Transforme l'expression en notation postfixée (RPN)
|
|
324
324
|
:param expression: l'expression donné par le tokenizer
|
|
@@ -328,7 +328,7 @@ def to_postfix(expression):
|
|
|
328
328
|
operators: list[Token] = []
|
|
329
329
|
|
|
330
330
|
for token in expression:
|
|
331
|
-
if token.type in (DTT.IDENT, DTT.
|
|
331
|
+
if token.type in (DTT.IDENT, DTT.INT, DTT.FLOAT, DTT.LIST, DTT.STR, DTT.BOOL, DTT.EVAL_GROUP): # Si c'est un ident
|
|
332
332
|
output.append(token)
|
|
333
333
|
elif token.value in dshell_operators:
|
|
334
334
|
while (operators and operators[-1].value in dshell_operators and
|
|
@@ -5,7 +5,7 @@ with open("README.md", "r") as fh:
|
|
|
5
5
|
|
|
6
6
|
setup(
|
|
7
7
|
name="dshellInterpreter",
|
|
8
|
-
version="0.2.
|
|
8
|
+
version="0.2.19.0",
|
|
9
9
|
author="Chronos",
|
|
10
10
|
author_email="vagabonwalybi@gmail.com",
|
|
11
11
|
description="A Discord bot interpreter for creating custom commands and automations.",
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_channel.py
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_member.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_message.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_pastbin.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/dshell_role.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/DISCORD_COMMANDS/utils/__init__.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellInterpreteur/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellInterpreteur/errors.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/__init__.py
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/Dshell/_DshellTokenizer/dshell_keywords.py
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/SOURCES.txt
RENAMED
|
File without changes
|
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/requires.txt
RENAMED
|
File without changes
|
{dshellinterpreter-0.2.18.7 → dshellinterpreter-0.2.19.0}/dshellInterpreter.egg-info/top_level.txt
RENAMED
|
File without changes
|
|
File without changes
|