dshellInterpreter 0.2.18.10__py3-none-any.whl → 0.2.19.0__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.

@@ -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):
@@ -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.INT, DTT.FLOAT, DTT.LIST, DTT.STR, DTT.BOOL): # Si c'est un ident
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
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: dshellInterpreter
3
- Version: 0.2.18.10
3
+ Version: 0.2.19.0
4
4
  Summary: A Discord bot interpreter for creating custom commands and automations.
5
5
  Home-page: https://github.com/BOXERRMD/Dshell_Interpreter
6
6
  Author: Chronos
@@ -16,17 +16,17 @@ Dshell/DISCORD_COMMANDS/utils/utils_permissions.py,sha256=Gi6vpCA2yXUZ20OCay5dkX
16
16
  Dshell/DISCORD_COMMANDS/utils/utils_string.py,sha256=2LvJG_PR_VkPdnsw0vKNTwhEQGNog-3gFd_rZIUpGKc,4709
17
17
  Dshell/DISCORD_COMMANDS/utils/utils_thread.py,sha256=tVl4msEwrWHY-0AytI6eY3JSs-eIFUigDSJfK9mT1ww,1457
18
18
  Dshell/_DshellInterpreteur/__init__.py,sha256=jl_gH8MoqerW--I-IHXwUZTo80JOtfr7AOA57xVgeGQ,58
19
- Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=zXvaZpeuz5JrIksNzhR7yD9V1fmvo4YMe3X6i9-6YCg,29789
19
+ Dshell/_DshellInterpreteur/dshell_interpreter.py,sha256=EWmvyKXoZ97p4-TKRjjJ5U_wQoRU9AAJPItjFkQL384,29818
20
20
  Dshell/_DshellInterpreteur/errors.py,sha256=0PJz_VYZfNZeKR_PEHxw3tRkgKNNUerV0wwrq2r1luA,250
21
21
  Dshell/_DshellParser/__init__.py,sha256=ONDfhZMvClqP_6tE8SLjp-cf3pXL-auQYnfYRrHZxC4,56
22
22
  Dshell/_DshellParser/ast_nodes.py,sha256=6SGRQ4wTniah90f-teCKg-l9q3yNzazIhi7Obm38Vow,19636
23
- Dshell/_DshellParser/dshell_parser.py,sha256=VIgqDgaXpp-f3p5Fxd474u1uhERft2eWUZE-o8nkOuY,19046
23
+ Dshell/_DshellParser/dshell_parser.py,sha256=sJdrzJV7Voi_OKx3IazdQ9Yg_5Sk6jz2y02TmsV7T88,19080
24
24
  Dshell/_DshellTokenizer/__init__.py,sha256=LIQSRhDx2B9pmPx5ADMwwD0Xr9ybneVLhHH8qrJWw_s,172
25
25
  Dshell/_DshellTokenizer/dshell_keywords.py,sha256=TI5O6y6gAXpM_dKxCW9Fk0H8VR-gmyxxKKOURgcHsCg,7219
26
26
  Dshell/_DshellTokenizer/dshell_token_type.py,sha256=bkug7eBKjYofkOGmwzPnAH9rQlU14cO0PelZbT0kGoQ,1544
27
27
  Dshell/_DshellTokenizer/dshell_tokenizer.py,sha256=aSXdzEyhqoYYLpMLsLwRpeQPp84PA1F5cjm9O1EYBQs,7350
28
- dshellinterpreter-0.2.18.10.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
29
- dshellinterpreter-0.2.18.10.dist-info/METADATA,sha256=H6Vcm9LXabCISgIS88R2MQ8bmEq3TjyLxeFvcEoeomo,1152
30
- dshellinterpreter-0.2.18.10.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
- dshellinterpreter-0.2.18.10.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
32
- dshellinterpreter-0.2.18.10.dist-info/RECORD,,
28
+ dshellinterpreter-0.2.19.0.dist-info/licenses/LICENSE,sha256=lNgcw1_xb7QENAQi3uHGymaFtbs0RV-ihiCd7AoLQjA,1082
29
+ dshellinterpreter-0.2.19.0.dist-info/METADATA,sha256=8sTRftB7cAWmI2S8mOHFHI6kiyER43otCq1hdhkuDzA,1151
30
+ dshellinterpreter-0.2.19.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
31
+ dshellinterpreter-0.2.19.0.dist-info/top_level.txt,sha256=B4CMhtmchGwPQJLuqUy0GhRG-0cUGxKL4GqEbCiB_vE,7
32
+ dshellinterpreter-0.2.19.0.dist-info/RECORD,,