IncludeCPP 3.8.9__py3-none-any.whl → 4.0.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.
- includecpp/__init__.py +1 -1
- includecpp/cli/commands.py +7 -14
- includecpp/core/cssl/CSSL_DOCUMENTATION.md +869 -1872
- includecpp/core/cssl/CSSL_DOCUMENTATION_NEW.md +1348 -0
- includecpp/core/cssl/cssl_builtins.pyi +231 -0
- includecpp/core/cssl/cssl_parser.py +365 -88
- includecpp/core/cssl/cssl_runtime.py +564 -41
- includecpp/core/cssl_bridge.py +4 -4
- includecpp/core/cssl_bridge.pyi +586 -193
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/METADATA +2 -1
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/RECORD +15 -14
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/WHEEL +0 -0
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/entry_points.txt +0 -0
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/licenses/LICENSE +0 -0
- {includecpp-3.8.9.dist-info → includecpp-4.0.2.dist-info}/top_level.txt +0 -0
includecpp/__init__.py
CHANGED
includecpp/cli/commands.py
CHANGED
|
@@ -9,8 +9,12 @@ import re
|
|
|
9
9
|
import urllib.request
|
|
10
10
|
import urllib.error
|
|
11
11
|
from pathlib import Path
|
|
12
|
+
from colorama import init as colorama_init, Fore, Style
|
|
12
13
|
from .config_parser import CppProjectConfig
|
|
13
14
|
|
|
15
|
+
# Initialize colorama for Windows ANSI color support
|
|
16
|
+
colorama_init()
|
|
17
|
+
|
|
14
18
|
|
|
15
19
|
def _is_experimental_enabled() -> bool:
|
|
16
20
|
"""Check if experimental features (cppy, ai) are enabled."""
|
|
@@ -7320,7 +7324,6 @@ def exec_repl(lang, path, import_all):
|
|
|
7320
7324
|
code_lines = imports + [''] + lines if imports else lines
|
|
7321
7325
|
|
|
7322
7326
|
click.echo()
|
|
7323
|
-
click.secho("--- Output ---", fg='green')
|
|
7324
7327
|
|
|
7325
7328
|
if is_python:
|
|
7326
7329
|
# Execute Python code
|
|
@@ -7443,9 +7446,6 @@ def exec_repl(lang, path, import_all):
|
|
|
7443
7446
|
except Exception:
|
|
7444
7447
|
pass
|
|
7445
7448
|
|
|
7446
|
-
click.echo()
|
|
7447
|
-
click.secho("--------------", fg='green')
|
|
7448
|
-
|
|
7449
7449
|
|
|
7450
7450
|
# ============================================================================
|
|
7451
7451
|
# CSSL - Hidden Command Group
|
|
@@ -7526,19 +7526,12 @@ def _cssl_execute(path, code):
|
|
|
7526
7526
|
source = '\n'.join(lines)
|
|
7527
7527
|
|
|
7528
7528
|
# Execute
|
|
7529
|
-
click.secho("--- Output ---", fg='green')
|
|
7530
7529
|
try:
|
|
7531
7530
|
result = cssl_lang.run(source)
|
|
7532
|
-
|
|
7533
|
-
# Output is already printed to stdout during execution via runtime.output()
|
|
7534
|
-
# Don't print "Result:" automatically - users should use printl() for output
|
|
7535
|
-
# This prevents unwanted output for function calls like: Function();
|
|
7536
|
-
pass
|
|
7537
|
-
|
|
7538
7531
|
except Exception as e:
|
|
7539
|
-
|
|
7540
|
-
|
|
7541
|
-
|
|
7532
|
+
error_msg = str(e)
|
|
7533
|
+
# Clean display - single CSSL Error: prefix with colorama
|
|
7534
|
+
click.echo(f"{Fore.RED}CSSL Error: {error_msg}{Style.RESET_ALL}")
|
|
7542
7535
|
|
|
7543
7536
|
|
|
7544
7537
|
@cssl.command(name='makemodule')
|