Typhon-Language 0.1.1__tar.gz → 0.1.3__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 (59) hide show
  1. {typhon_language-0.1.1/src/Typhon_Language.egg-info → typhon_language-0.1.3}/PKG-INFO +51 -6
  2. typhon_language-0.1.1/PKG-INFO → typhon_language-0.1.3/README.md +153 -123
  3. {typhon_language-0.1.1 → typhon_language-0.1.3}/pyproject.toml +1 -1
  4. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/translate.py +2 -1
  5. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/_typhon_parser.py +1638 -1649
  6. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/syntax_errors.py +11 -0
  7. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/typhon_ast.py +405 -55
  8. typhon_language-0.1.3/src/Typhon/Grammar/unparse_custom.py +25 -0
  9. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/SourceMap/datatype.py +264 -264
  10. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/const_member_to_final.py +1 -1
  11. typhon_language-0.1.3/src/Typhon/Transform/extended_patterns.py +139 -0
  12. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/forbidden_statements.py +24 -0
  13. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/if_while_let.py +122 -11
  14. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/inline_statement_block_capture.py +22 -15
  15. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/placeholder_to_function.py +0 -1
  16. typhon_language-0.1.3/src/Typhon/Transform/record_to_dataclass.py +256 -0
  17. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/scope_check_rename.py +65 -11
  18. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/transform.py +16 -12
  19. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/type_abbrev_desugar.py +1 -1
  20. typhon_language-0.1.3/src/Typhon/Transform/utils/imports.py +48 -0
  21. typhon_language-0.1.1/src/Typhon/Transform/utils.py → typhon_language-0.1.3/src/Typhon/Transform/utils/jump_away.py +2 -38
  22. typhon_language-0.1.3/src/Typhon/Transform/utils/make_class.py +140 -0
  23. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Typing/pyright.py +143 -144
  24. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Typing/result_diagnostic.py +1 -1
  25. typhon_language-0.1.3/src/Typhon/__init__.py +0 -0
  26. typhon_language-0.1.1/README.md → typhon_language-0.1.3/src/Typhon_Language.egg-info/PKG-INFO +168 -108
  27. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon_Language.egg-info/SOURCES.txt +6 -1
  28. typhon_language-0.1.1/src/Typhon/Transform/record_to_dataclass.py +0 -472
  29. {typhon_language-0.1.1 → typhon_language-0.1.3}/LICENSE +0 -0
  30. {typhon_language-0.1.1 → typhon_language-0.1.3}/setup.cfg +0 -0
  31. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/debugging.py +0 -0
  32. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/diagnostic.py +0 -0
  33. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/run.py +0 -0
  34. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/type_check.py +0 -0
  35. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Driver/utils.py +0 -0
  36. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/__init__.py +0 -0
  37. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/line_break.py +0 -0
  38. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/parser.py +0 -0
  39. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/parser_helper.py +0 -0
  40. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/token_factory_custom.py +0 -0
  41. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Grammar/tokenizer_custom.py +0 -0
  42. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/SourceMap/__init__.py +0 -0
  43. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/SourceMap/ast_match_based_map.py +0 -0
  44. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/SourceMap/ast_matching.py +0 -0
  45. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/__init__.py +0 -0
  46. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/comprehension_to_function.py +0 -0
  47. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/func_literal_to_def.py +0 -0
  48. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/insert_self_to_method.py +0 -0
  49. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/name_generator.py +0 -0
  50. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/optional_operators_to_checked.py +0 -0
  51. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/type_annotation_check_expand.py +0 -0
  52. {typhon_language-0.1.1/src/Typhon/Typing → typhon_language-0.1.3/src/Typhon/Transform/utils}/__init__.py +0 -0
  53. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/Transform/visitor.py +0 -0
  54. {typhon_language-0.1.1/src/Typhon → typhon_language-0.1.3/src/Typhon/Typing}/__init__.py +0 -0
  55. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon/__main__.py +0 -0
  56. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon_Language.egg-info/dependency_links.txt +0 -0
  57. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon_Language.egg-info/entry_points.txt +0 -0
  58. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon_Language.egg-info/requires.txt +0 -0
  59. {typhon_language-0.1.1 → typhon_language-0.1.3}/src/Typhon_Language.egg-info/top_level.txt +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: Typhon-Language
3
- Version: 0.1.1
3
+ Version: 0.1.3
4
4
  Summary: Typhon programming language
5
5
  Requires-Python: >=3.12
6
6
  Description-Content-Type: text/markdown
@@ -17,17 +17,58 @@ Dynamic: license-file
17
17
 
18
18
  Typhon is a modernized syntax sugar for Python, designed to improve developer experience with features like static typing, brace-based scoping, and expressive functional programming capabilities.
19
19
 
20
- GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
21
- PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
20
+ - GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
21
+ - PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
22
+ - VSCode extension: [Typhon Language Support](https://marketplace.visualstudio.com/items?itemName=hnakamura5.typhon-language-support) from [GitHub Repository](https://github.com/hnakamura5/typhon-language-support)
23
+
24
+ ## Getting Started
25
+
26
+ Install Typhon via pip:
27
+
28
+ ```bash
29
+ pip install typhon-language
30
+ ```
31
+
32
+ Run Typhon from the command line:
33
+
34
+ ```bash
35
+ typhon --help
36
+ ```
37
+
38
+ Create a simple Typhon program in `hello.typh`:
39
+
40
+ ```typhon
41
+ def main() {
42
+ print("Hello, Typhon!")
43
+ }
44
+ main()
45
+ ```
46
+
47
+ Run the program:
48
+
49
+ ```bash
50
+ typhon run hello.typh
51
+ ```
52
+
53
+ Or run directly using uvx:
54
+
55
+ ```bash
56
+ uvx --from typhon-language typhon run hello.typh
57
+ ```
22
58
 
23
59
  ## Design Concepts
24
60
 
25
61
  Typhon is built on three core pillars:
26
62
 
27
- 1. **Safety**: As expected from modern programming languages, Typhon enforces safety through static typing, lexical scopes, immutable-by-default variables (`let`), and null safety features (`?.`, `??`).
63
+ 1. **Safety**: As expected in modern programming languages, Typhon enforces safety through static typing, lexical scopes, immutable-by-default variables (`let`), and null safety features (`?.`, `??`, `?()`, `?[]`).
28
64
  2. **Expressiveness**: Expression-oriented design with functional programming features. Control comprehension forms for `if`, `match`, `try`, and so on enable concise, value-returning expressions. Function literals, placeholders and pipe operators facilitate clean and readable code.
29
65
  3. **Python Interoperability**: Typhon compiles directly to Python, allowing you to use the vast ecosystem of Python libraries seamlessly while enjoying a modern syntax.
30
66
 
67
+ ### How it looks like
68
+
69
+ You can see small code snippets in the test directory: [Typhon Tests](test/execute/RunFileTest/).
70
+
71
+
31
72
  ## Documentation
32
73
 
33
74
  For a complete guide to the language, please visit the **[Typhon Reference Manual](doc/reference/README.md)**.
@@ -48,8 +89,8 @@ Typhon retains most of Python's semantics but introduces significant syntax chan
48
89
 
49
90
  ### Main Changes
50
91
 
51
- - **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md).
52
- - **Static Typing**: Type checking is enforced at compile time.
92
+ - **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md) for more details.
93
+ - **Static Typing**: Type checking is enforced at compile time. Currently powered by [basedpyright](https://docs.basedpyright.com/latest/) type checker.
53
94
  - **Declarations**: Variables must be declared with `let` (immutable) or `var` (mutable). See [Variables](doc/reference/variables.md).
54
95
 
55
96
  ### Syntax Extensions
@@ -83,6 +124,10 @@ Some Python features are removed to enforce safety and clarity. See [Removed Fea
83
124
 
84
125
  Typhon can be run directly or translated to Python.
85
126
 
127
+ `.typh` files are Typhon source files. In directory mode, all `.typh` files are processed.
128
+
129
+ Note Typhon uses `.typhon` directory in source paths to place translated Python files and caches.
130
+
86
131
  ### Run
87
132
 
88
133
  Run a Typhon source file or directory.
@@ -1,123 +1,153 @@
1
- Metadata-Version: 2.4
2
- Name: Typhon-Language
3
- Version: 0.1.1
4
- Summary: Typhon programming language
5
- Requires-Python: >=3.12
6
- Description-Content-Type: text/markdown
7
- License-File: LICENSE
8
- Requires-Dist: basedpyright>=1.32.1
9
- Requires-Dist: fire>=0.7.1
10
- Requires-Dist: intervaltree>=3.1.0
11
- Requires-Dist: pegen>=0.3.0
12
- Requires-Dist: pytest>=8.4.1
13
- Requires-Dist: ruff>=0.12.5
14
- Dynamic: license-file
15
-
16
- # Typhon
17
-
18
- Typhon is a modernized syntax sugar for Python, designed to improve developer experience with features like static typing, brace-based scoping, and expressive functional programming capabilities.
19
-
20
- GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
21
- PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
22
-
23
- ## Design Concepts
24
-
25
- Typhon is built on three core pillars:
26
-
27
- 1. **Safety**: As expected from modern programming languages, Typhon enforces safety through static typing, lexical scopes, immutable-by-default variables (`let`), and null safety features (`?.`, `??`).
28
- 2. **Expressiveness**: Expression-oriented design with functional programming features. Control comprehension forms for `if`, `match`, `try`, and so on enable concise, value-returning expressions. Function literals, placeholders and pipe operators facilitate clean and readable code.
29
- 3. **Python Interoperability**: Typhon compiles directly to Python, allowing you to use the vast ecosystem of Python libraries seamlessly while enjoying a modern syntax.
30
-
31
- ## Documentation
32
-
33
- For a complete guide to the language, please visit the **[Typhon Reference Manual](doc/reference/README.md)**.
34
-
35
- ### Quick Links
36
-
37
- - [Lexical Structure](doc/reference/lexical_structure.md) (Comments, Keywords, Delimiters)
38
- - [Types](doc/reference/types.md)
39
- - [Variables](doc/reference/variables.md)
40
- - [Expressions](doc/reference/expressions/README.md)
41
- - [Statements](doc/reference/statements/README.md)
42
- - [Definitions](doc/reference/definitions/README.md) (Functions, Classes, Modules)
43
- - [Removed Features](doc/reference/removed_features.md)
44
-
45
- ## Syntax Changes from Python
46
-
47
- Typhon retains most of Python's semantics but introduces significant syntax changes.
48
-
49
- ### Main Changes
50
-
51
- - **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md).
52
- - **Static Typing**: Type checking is enforced at compile time.
53
- - **Declarations**: Variables must be declared with `let` (immutable) or `var` (mutable). See [Variables](doc/reference/variables.md).
54
-
55
- ### Syntax Extensions
56
-
57
- - **Null Safety**: `?.`, `??`, `?()`, `?[]` operators. See [Null Safety](doc/reference/expressions/null_safety.md).
58
- - **Function literals**: Unrestricted function literals with `(x) => { return x + 1 }` syntax, with totally the same capability as normal functions. See[Function literals](doc/reference/expressions/literals.md#function-literals).
59
- - **Pipe Operator**: `x |> f` for function chaining. See [Pipe Operator](doc/reference/expressions/pipe_operator.md).
60
- - **Placeholders**: `_` for concise anonymous functions (e.g., `_ + 1`). See [Placeholders](doc/reference/expressions/placeholders.md).
61
- - **Control Comprehensions**: Control statements as expressions (e.g., `(if (c) x else y)`). All `if/while/for/let/try/with/match` are supported as comprehension. See [Comprehensions](doc/reference/expressions/comprehensions.md).
62
- - **Pattern Matching**: Enhanced `match`, `if-let`, and `let-else` statements. See [Control Flow](doc/reference/statements/control_flow.md).
63
- - **`self` Keyword**: `self` is a keyword and is not explicitly declared in method signatures. See [Classes](doc/reference/items/classes.md).
64
- - **Data Records**: Anonymous immutable structs `{|x=1|}`. See [Types](doc/reference/types.md).
65
- - **Block Comments**: `#( ... )#` allows nested comments.
66
-
67
- ### Detailed Design Changes
68
-
69
- - **Logical Operators**: `&&`, `||`, `!` replace `and`, `or`, `not` (though Python keywords are still reserved).
70
- - **Const Parameters**: Function parameters are immutable by default.
71
- - **Line Breaks**: Stricter rules for line continuations. See [Lexical Structure](doc/reference/lexical_structure.md).
72
-
73
- ### Syntax Restrictions
74
-
75
- Some Python features are removed to enforce safety and clarity. See [Removed Features](doc/reference/removed_features.md).
76
-
77
- - No `del`, `global`, `nonlocal`.
78
- - No wildcard imports.
79
- - No chained assignments (`a = b = c`).
80
- - No control statements inside class bodies.
81
-
82
- ## Usage
83
-
84
- Typhon can be run directly or translated to Python.
85
-
86
- ### Run
87
-
88
- Run a Typhon source file or directory.
89
-
90
- ```bash
91
- typhon run <source> [args...]
92
- ```
93
-
94
- ### Translate
95
-
96
- Translate Typhon code to Python.
97
-
98
- ```bash
99
- typhon translate <source> [-o output_dir]
100
- ```
101
-
102
- ### Type Check
103
-
104
- Run type checking on Typhon code.
105
-
106
- ```bash
107
- typhon type_check <source>
108
- ```
109
-
110
- ## Future Plans
111
-
112
- See [Future Plans](doc/reference/future_plans.md) for planned features like compile-time controls (`static if`) and known limitations.
113
-
114
- ## Influenced By
115
-
116
- Typhon draws inspiration from several modern programming languages:
117
-
118
- - Python
119
- - TypeScript
120
- - Swift
121
- - Rust
122
- - Scala
123
- - F#
1
+ # Typhon
2
+
3
+ Typhon is a modernized syntax sugar for Python, designed to improve developer experience with features like static typing, brace-based scoping, and expressive functional programming capabilities.
4
+
5
+ - GitHub repository: [Typhon](https://github.com/hnakamura5/Typhon)
6
+ - PyPI package: [Typhon-Language](https://pypi.org/project/Typhon-Language/)
7
+ - VSCode extension: [Typhon Language Support](https://marketplace.visualstudio.com/items?itemName=hnakamura5.typhon-language-support) from [GitHub Repository](https://github.com/hnakamura5/typhon-language-support)
8
+
9
+ ## Getting Started
10
+
11
+ Install Typhon via pip:
12
+
13
+ ```bash
14
+ pip install typhon-language
15
+ ```
16
+
17
+ Run Typhon from the command line:
18
+
19
+ ```bash
20
+ typhon --help
21
+ ```
22
+
23
+ Create a simple Typhon program in `hello.typh`:
24
+
25
+ ```typhon
26
+ def main() {
27
+ print("Hello, Typhon!")
28
+ }
29
+ main()
30
+ ```
31
+
32
+ Run the program:
33
+
34
+ ```bash
35
+ typhon run hello.typh
36
+ ```
37
+
38
+ Or run directly using uvx:
39
+
40
+ ```bash
41
+ uvx --from typhon-language typhon run hello.typh
42
+ ```
43
+
44
+ ## Design Concepts
45
+
46
+ Typhon is built on three core pillars:
47
+
48
+ 1. **Safety**: As expected in modern programming languages, Typhon enforces safety through static typing, lexical scopes, immutable-by-default variables (`let`), and null safety features (`?.`, `??`, `?()`, `?[]`).
49
+ 2. **Expressiveness**: Expression-oriented design with functional programming features. Control comprehension forms for `if`, `match`, `try`, and so on enable concise, value-returning expressions. Function literals, placeholders and pipe operators facilitate clean and readable code.
50
+ 3. **Python Interoperability**: Typhon compiles directly to Python, allowing you to use the vast ecosystem of Python libraries seamlessly while enjoying a modern syntax.
51
+
52
+ ### How it looks like
53
+
54
+ You can see small code snippets in the test directory: [Typhon Tests](test/execute/RunFileTest/).
55
+
56
+
57
+ ## Documentation
58
+
59
+ For a complete guide to the language, please visit the **[Typhon Reference Manual](doc/reference/README.md)**.
60
+
61
+ ### Quick Links
62
+
63
+ - [Lexical Structure](doc/reference/lexical_structure.md) (Comments, Keywords, Delimiters)
64
+ - [Types](doc/reference/types.md)
65
+ - [Variables](doc/reference/variables.md)
66
+ - [Expressions](doc/reference/expressions/README.md)
67
+ - [Statements](doc/reference/statements/README.md)
68
+ - [Definitions](doc/reference/definitions/README.md) (Functions, Classes, Modules)
69
+ - [Removed Features](doc/reference/removed_features.md)
70
+
71
+ ## Syntax Changes from Python
72
+
73
+ Typhon retains most of Python's semantics but introduces significant syntax changes.
74
+
75
+ ### Main Changes
76
+
77
+ - **Brace Scoping**: Typhon uses `{ ... }` for blocks, replacing indentation-based scoping. Both `;` and line breaks can also act as delimiters. See [Lexical Structure](doc/reference/lexical_structure.md) for more details.
78
+ - **Static Typing**: Type checking is enforced at compile time. Currently powered by [basedpyright](https://docs.basedpyright.com/latest/) type checker.
79
+ - **Declarations**: Variables must be declared with `let` (immutable) or `var` (mutable). See [Variables](doc/reference/variables.md).
80
+
81
+ ### Syntax Extensions
82
+
83
+ - **Null Safety**: `?.`, `??`, `?()`, `?[]` operators. See [Null Safety](doc/reference/expressions/null_safety.md).
84
+ - **Function literals**: Unrestricted function literals with `(x) => { return x + 1 }` syntax, with totally the same capability as normal functions. See[Function literals](doc/reference/expressions/literals.md#function-literals).
85
+ - **Pipe Operator**: `x |> f` for function chaining. See [Pipe Operator](doc/reference/expressions/pipe_operator.md).
86
+ - **Placeholders**: `_` for concise anonymous functions (e.g., `_ + 1`). See [Placeholders](doc/reference/expressions/placeholders.md).
87
+ - **Control Comprehensions**: Control statements as expressions (e.g., `(if (c) x else y)`). All `if/while/for/let/try/with/match` are supported as comprehension. See [Comprehensions](doc/reference/expressions/comprehensions.md).
88
+ - **Pattern Matching**: Enhanced `match`, `if-let`, and `let-else` statements. See [Control Flow](doc/reference/statements/control_flow.md).
89
+ - **`self` Keyword**: `self` is a keyword and is not explicitly declared in method signatures. See [Classes](doc/reference/items/classes.md).
90
+ - **Data Records**: Anonymous immutable structs `{|x=1|}`. See [Types](doc/reference/types.md).
91
+ - **Block Comments**: `#( ... )#` allows nested comments.
92
+
93
+ ### Detailed Design Changes
94
+
95
+ - **Logical Operators**: `&&`, `||`, `!` replace `and`, `or`, `not` (though Python keywords are still reserved).
96
+ - **Const Parameters**: Function parameters are immutable by default.
97
+ - **Line Breaks**: Stricter rules for line continuations. See [Lexical Structure](doc/reference/lexical_structure.md).
98
+
99
+ ### Syntax Restrictions
100
+
101
+ Some Python features are removed to enforce safety and clarity. See [Removed Features](doc/reference/removed_features.md).
102
+
103
+ - No `del`, `global`, `nonlocal`.
104
+ - No wildcard imports.
105
+ - No chained assignments (`a = b = c`).
106
+ - No control statements inside class bodies.
107
+
108
+ ## Usage
109
+
110
+ Typhon can be run directly or translated to Python.
111
+
112
+ `.typh` files are Typhon source files. In directory mode, all `.typh` files are processed.
113
+
114
+ Note Typhon uses `.typhon` directory in source paths to place translated Python files and caches.
115
+
116
+ ### Run
117
+
118
+ Run a Typhon source file or directory.
119
+
120
+ ```bash
121
+ typhon run <source> [args...]
122
+ ```
123
+
124
+ ### Translate
125
+
126
+ Translate Typhon code to Python.
127
+
128
+ ```bash
129
+ typhon translate <source> [-o output_dir]
130
+ ```
131
+
132
+ ### Type Check
133
+
134
+ Run type checking on Typhon code.
135
+
136
+ ```bash
137
+ typhon type_check <source>
138
+ ```
139
+
140
+ ## Future Plans
141
+
142
+ See [Future Plans](doc/reference/future_plans.md) for planned features like compile-time controls (`static if`) and known limitations.
143
+
144
+ ## Influenced By
145
+
146
+ Typhon draws inspiration from several modern programming languages:
147
+
148
+ - Python
149
+ - TypeScript
150
+ - Swift
151
+ - Rust
152
+ - Scala
153
+ - F#
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "Typhon-Language"
3
- version = "0.1.1"
3
+ version = "0.1.3"
4
4
  description = "Typhon programming language"
5
5
  readme = "README.md"
6
6
  requires-python = ">=3.12"
@@ -8,6 +8,7 @@ from ..Grammar.syntax_errors import (
8
8
  TyphonSyntaxError,
9
9
  TyphonSyntaxErrorList,
10
10
  )
11
+ from ..Grammar.unparse_custom import unparse_custom
11
12
  from .utils import (
12
13
  shorthand,
13
14
  TYPHON_EXT,
@@ -43,7 +44,7 @@ def translate_file(source: Path, output: Path) -> TranslateResult:
43
44
  source_map=None,
44
45
  syntax_error=e,
45
46
  )
46
- translated_code = ast.unparse(ast_tree)
47
+ translated_code = unparse_custom(ast_tree)
47
48
  source_code = source.read_text(encoding="utf-8")
48
49
  mapping = map_from_transformed_ast(
49
50
  ast_tree, ast.parse(translated_code), source_code, source.as_posix()