echolang 0.8.9__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.
Files changed (61) hide show
  1. echolang-0.8.9/LICENSE +21 -0
  2. echolang-0.8.9/PKG-INFO +106 -0
  3. echolang-0.8.9/README.md +85 -0
  4. echolang-0.8.9/pyproject.toml +43 -0
  5. echolang-0.8.9/setup.cfg +4 -0
  6. echolang-0.8.9/src/echo/__init__.py +3 -0
  7. echolang-0.8.9/src/echo/__main__.py +4 -0
  8. echolang-0.8.9/src/echo/cli/__init__.py +3 -0
  9. echolang-0.8.9/src/echo/cli/main.py +470 -0
  10. echolang-0.8.9/src/echo/cli/test_runner.py +287 -0
  11. echolang-0.8.9/src/echo/core/__init__.py +1 -0
  12. echolang-0.8.9/src/echo/core/hashes.py +45 -0
  13. echolang-0.8.9/src/echo/core/jsonutil.py +74 -0
  14. echolang-0.8.9/src/echo/core/lists.py +103 -0
  15. echolang-0.8.9/src/echo/core/strings.py +152 -0
  16. echolang-0.8.9/src/echo/errors.py +113 -0
  17. echolang-0.8.9/src/echo/formatter.py +563 -0
  18. echolang-0.8.9/src/echo/frontend/__init__.py +5 -0
  19. echolang-0.8.9/src/echo/frontend/ast/__init__.py +1 -0
  20. echolang-0.8.9/src/echo/frontend/ast/nodes.py +456 -0
  21. echolang-0.8.9/src/echo/frontend/lexer.py +332 -0
  22. echolang-0.8.9/src/echo/frontend/parser.py +1376 -0
  23. echolang-0.8.9/src/echo/frontend/tokens.py +163 -0
  24. echolang-0.8.9/src/echo/linter.py +543 -0
  25. echolang-0.8.9/src/echo/modules/__init__.py +6 -0
  26. echolang-0.8.9/src/echo/modules/graph.py +88 -0
  27. echolang-0.8.9/src/echo/modules/loader.py +194 -0
  28. echolang-0.8.9/src/echo/modules/records.py +27 -0
  29. echolang-0.8.9/src/echo/modules/resolver.py +31 -0
  30. echolang-0.8.9/src/echo/runtime/__init__.py +3 -0
  31. echolang-0.8.9/src/echo/runtime/builtin_types.py +107 -0
  32. echolang-0.8.9/src/echo/runtime/builtins.py +1130 -0
  33. echolang-0.8.9/src/echo/runtime/class_registry.py +47 -0
  34. echolang-0.8.9/src/echo/runtime/context.py +182 -0
  35. echolang-0.8.9/src/echo/runtime/errors.py +17 -0
  36. echolang-0.8.9/src/echo/runtime/freeze.py +37 -0
  37. echolang-0.8.9/src/echo/runtime/functions.py +198 -0
  38. echolang-0.8.9/src/echo/runtime/host.py +85 -0
  39. echolang-0.8.9/src/echo/runtime/instances.py +9 -0
  40. echolang-0.8.9/src/echo/runtime/interpreter.py +1744 -0
  41. echolang-0.8.9/src/echo/runtime/operators.py +150 -0
  42. echolang-0.8.9/src/echo/runtime/testing.py +59 -0
  43. echolang-0.8.9/src/echo/runtime/values.py +589 -0
  44. echolang-0.8.9/src/echo/semantics/__init__.py +4 -0
  45. echolang-0.8.9/src/echo/semantics/analyzer.py +1814 -0
  46. echolang-0.8.9/src/echo/semantics/errors.py +3 -0
  47. echolang-0.8.9/src/echo/semantics/modules.py +15 -0
  48. echolang-0.8.9/src/echo/semantics/scope.py +67 -0
  49. echolang-0.8.9/src/echo/semantics/symbols.py +30 -0
  50. echolang-0.8.9/src/echo_cli.py +5 -0
  51. echolang-0.8.9/src/echolang.egg-info/PKG-INFO +106 -0
  52. echolang-0.8.9/src/echolang.egg-info/SOURCES.txt +59 -0
  53. echolang-0.8.9/src/echolang.egg-info/dependency_links.txt +1 -0
  54. echolang-0.8.9/src/echolang.egg-info/entry_points.txt +4 -0
  55. echolang-0.8.9/src/echolang.egg-info/requires.txt +4 -0
  56. echolang-0.8.9/src/echolang.egg-info/top_level.txt +3 -0
  57. echolang-0.8.9/src/main.py +9 -0
  58. echolang-0.8.9/tests/test_builtins.py +52 -0
  59. echolang-0.8.9/tests/test_cli.py +599 -0
  60. echolang-0.8.9/tests/test_examples.py +17 -0
  61. echolang-0.8.9/tests/test_language_behavior.py +61 -0
echolang-0.8.9/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Deekshith Poojary
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,106 @@
1
+ Metadata-Version: 2.4
2
+ Name: echolang
3
+ Version: 0.8.9
4
+ Summary: Echo programming language interpreter
5
+ Author-email: Deekshith Poojary <deekshithpoojary355@gmail.com>
6
+ Maintainer: Deekshith Poojary
7
+ Project-URL: Homepage, https://deekshith-poojary98.github.io/echo/index.html
8
+ Project-URL: Repository, https://github.com/deekshith-poojary98/echo
9
+ Classifier: Programming Language :: Python :: 3
10
+ Classifier: Programming Language :: Python :: 3 :: Only
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Operating System :: OS Independent
13
+ Classifier: Topic :: Software Development :: Interpreters
14
+ Requires-Python: >=3.10
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Requires-Dist: rich>=13.0.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: pytest>=8.0; extra == "dev"
20
+ Dynamic: license-file
21
+
22
+ # Echo
23
+
24
+ Echo is a small interpreted scripting language. Types are declared explicitly and checked at runtime. Abort is the default failure mode; recovery is inquiry and `*Or` twins, not `try` / `catch`.
25
+
26
+ Docs: [https://deekshith-poojary98.github.io/echo/](https://deekshith-poojary98.github.io/echo/) — includes a [browser playground](https://deekshith-poojary98.github.io/echo/playground).
27
+
28
+ ```echo
29
+ name: str = "Echo";
30
+ scores: list = [95, 85, 75];
31
+
32
+ fn greet(name: str) -> void {
33
+ say("Hello, ${name}!");
34
+ }
35
+
36
+ greet(name);
37
+
38
+ for i: int in 0..10 by 2 {
39
+ say("Count:", i);
40
+ }
41
+ ```
42
+
43
+ ## What you get
44
+
45
+ - Typed declarations and parameters; runtime checks on bind / assign / return
46
+ - `list` and `hash`, string interpolation, method calls, `use mut`, lexical scope
47
+ - File modules: `export` / `import name from "module"`
48
+ - Type aliases, object types (`exact { ... }` too), unions (`int | str`), first-class functions and builtins-as-values
49
+ - Nominal `class` with `new { ... }` fields, methods (`this`), type methods, unbound methods, and `interface` (optional `implements`; no inheritance)
50
+ - CLI: run a file, REPL, `check`, `test`, `fmt`, `lint`
51
+
52
+ ## What you do not
53
+
54
+ - No class inheritance (`extends`), no generics, no `try` / `catch`
55
+ - Type inference is limited — you still declare types
56
+ - See [Known Limitations](https://deekshith-poojary98.github.io/echo/errors-diagnostics/known-limitations) and [failure model](https://deekshith-poojary98.github.io/echo/failure-model)
57
+
58
+ ## Install
59
+
60
+ Python 3.10+. Prefer the command name **`elang`** — short, and shells often reserve `echo`. The package also registers `echolang` (and `echo`).
61
+
62
+ Package name on PyPI is **`echolang`**.
63
+
64
+ ### pipx (recommended)
65
+
66
+ ```bash
67
+ python3 -m pip install --user pipx
68
+ python3 -m pipx ensurepath
69
+ pipx install echolang
70
+ elang --version
71
+ ```
72
+
73
+ From GitHub instead of PyPI:
74
+
75
+ ```bash
76
+ pipx install git+https://github.com/deekshith-poojary98/echo.git
77
+ ```
78
+
79
+ ### From a clone
80
+
81
+ ```bash
82
+ pip install .
83
+ # or: pip install -e .
84
+ elang path/to/file.echo
85
+ ```
86
+
87
+ ### Without installing
88
+
89
+ ```bash
90
+ python src/main.py examples/language_feature_smoke.echo
91
+ python src/main.py examples/language_feature_smoke.echo --plain
92
+ ```
93
+
94
+ Repo launchers: `./elang` (Unix) or `.\elang.bat` (Windows). `./echolang` still works.
95
+
96
+ ## Layout
97
+
98
+ - `src/echo/` — frontend, semantics, modules, runtime, CLI
99
+ - `docs/` — VitePress site (this is the docs source)
100
+ - `docs/language-semantics.md` — language contract (v0.2 base; additive through 0.8.x)
101
+ - `docs/module-semantics.md` — v0.3 module contract
102
+ - `*.echo` / `examples/` — sample programs (including `examples/classes_and_interfaces.echo`)
103
+
104
+ ## License / contributing
105
+
106
+ License and contribution guidelines are not filled in yet.
@@ -0,0 +1,85 @@
1
+ # Echo
2
+
3
+ Echo is a small interpreted scripting language. Types are declared explicitly and checked at runtime. Abort is the default failure mode; recovery is inquiry and `*Or` twins, not `try` / `catch`.
4
+
5
+ Docs: [https://deekshith-poojary98.github.io/echo/](https://deekshith-poojary98.github.io/echo/) — includes a [browser playground](https://deekshith-poojary98.github.io/echo/playground).
6
+
7
+ ```echo
8
+ name: str = "Echo";
9
+ scores: list = [95, 85, 75];
10
+
11
+ fn greet(name: str) -> void {
12
+ say("Hello, ${name}!");
13
+ }
14
+
15
+ greet(name);
16
+
17
+ for i: int in 0..10 by 2 {
18
+ say("Count:", i);
19
+ }
20
+ ```
21
+
22
+ ## What you get
23
+
24
+ - Typed declarations and parameters; runtime checks on bind / assign / return
25
+ - `list` and `hash`, string interpolation, method calls, `use mut`, lexical scope
26
+ - File modules: `export` / `import name from "module"`
27
+ - Type aliases, object types (`exact { ... }` too), unions (`int | str`), first-class functions and builtins-as-values
28
+ - Nominal `class` with `new { ... }` fields, methods (`this`), type methods, unbound methods, and `interface` (optional `implements`; no inheritance)
29
+ - CLI: run a file, REPL, `check`, `test`, `fmt`, `lint`
30
+
31
+ ## What you do not
32
+
33
+ - No class inheritance (`extends`), no generics, no `try` / `catch`
34
+ - Type inference is limited — you still declare types
35
+ - See [Known Limitations](https://deekshith-poojary98.github.io/echo/errors-diagnostics/known-limitations) and [failure model](https://deekshith-poojary98.github.io/echo/failure-model)
36
+
37
+ ## Install
38
+
39
+ Python 3.10+. Prefer the command name **`elang`** — short, and shells often reserve `echo`. The package also registers `echolang` (and `echo`).
40
+
41
+ Package name on PyPI is **`echolang`**.
42
+
43
+ ### pipx (recommended)
44
+
45
+ ```bash
46
+ python3 -m pip install --user pipx
47
+ python3 -m pipx ensurepath
48
+ pipx install echolang
49
+ elang --version
50
+ ```
51
+
52
+ From GitHub instead of PyPI:
53
+
54
+ ```bash
55
+ pipx install git+https://github.com/deekshith-poojary98/echo.git
56
+ ```
57
+
58
+ ### From a clone
59
+
60
+ ```bash
61
+ pip install .
62
+ # or: pip install -e .
63
+ elang path/to/file.echo
64
+ ```
65
+
66
+ ### Without installing
67
+
68
+ ```bash
69
+ python src/main.py examples/language_feature_smoke.echo
70
+ python src/main.py examples/language_feature_smoke.echo --plain
71
+ ```
72
+
73
+ Repo launchers: `./elang` (Unix) or `.\elang.bat` (Windows). `./echolang` still works.
74
+
75
+ ## Layout
76
+
77
+ - `src/echo/` — frontend, semantics, modules, runtime, CLI
78
+ - `docs/` — VitePress site (this is the docs source)
79
+ - `docs/language-semantics.md` — language contract (v0.2 base; additive through 0.8.x)
80
+ - `docs/module-semantics.md` — v0.3 module contract
81
+ - `*.echo` / `examples/` — sample programs (including `examples/classes_and_interfaces.echo`)
82
+
83
+ ## License / contributing
84
+
85
+ License and contribution guidelines are not filled in yet.
@@ -0,0 +1,43 @@
1
+ [build-system]
2
+ requires = ["setuptools>=68", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "echolang"
7
+ version = "0.8.9"
8
+ description = "Echo programming language interpreter"
9
+ readme = "README.md"
10
+ requires-python = ">=3.10"
11
+ dependencies = ["rich>=13.0.0"]
12
+ authors = [{ name = "Deekshith Poojary", email = "deekshithpoojary355@gmail.com" }]
13
+ maintainers = [{ name = "Deekshith Poojary" }]
14
+ classifiers = [
15
+ "Programming Language :: Python :: 3",
16
+ "Programming Language :: Python :: 3 :: Only",
17
+ "License :: OSI Approved :: MIT License",
18
+ "Operating System :: OS Independent",
19
+ "Topic :: Software Development :: Interpreters"
20
+ ]
21
+
22
+ [project.urls]
23
+ Homepage = "https://deekshith-poojary98.github.io/echo/index.html"
24
+ Repository = "https://github.com/deekshith-poojary98/echo"
25
+
26
+ [project.optional-dependencies]
27
+ dev = ["pytest>=8.0"]
28
+
29
+ [project.scripts]
30
+ echo = "echo.cli.main:main"
31
+ elang = "echo.cli.main:main"
32
+ echolang = "echo.cli.main:main"
33
+
34
+ [tool.setuptools]
35
+ package-dir = {"" = "src"}
36
+ py-modules = ["echo_cli", "main"]
37
+
38
+ [tool.setuptools.packages.find]
39
+ where = ["src"]
40
+
41
+ [tool.pytest.ini_options]
42
+ testpaths = ["tests"]
43
+ pythonpath = ["src", "tests"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,3 @@
1
+ """Echo programming language."""
2
+
3
+ __version__ = "0.8.9"
@@ -0,0 +1,4 @@
1
+ from echo.cli.main import main
2
+ import sys
3
+
4
+ raise SystemExit(main())
@@ -0,0 +1,3 @@
1
+ from echo.cli.main import main
2
+
3
+ __all__ = ["main"]