openscad-parser 2.4.8__tar.gz → 2.5.1__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.
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/PKG-INFO +1 -1
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/pyproject.toml +1 -1
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/__init__.py +3 -5
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/builder.py +300 -376
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/nodes.py +126 -11
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/pretty_print.py +164 -36
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/cli.py +37 -20
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/grammar.py +57 -28
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/README.rst +0 -0
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/__init__.py +0 -0
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/scope.py +0 -0
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/serialization.py +0 -0
- {openscad_parser-2.4.8 → openscad_parser-2.5.1}/src/openscad_parser/ast/source_map.py +0 -0
|
@@ -10,6 +10,7 @@ from .nodes import (
|
|
|
10
10
|
ASTNode,
|
|
11
11
|
CommentLine,
|
|
12
12
|
CommentSpan,
|
|
13
|
+
CommentedExpr,
|
|
13
14
|
Expression,
|
|
14
15
|
Primary,
|
|
15
16
|
Identifier,
|
|
@@ -337,11 +338,8 @@ def getASTfromFile(file: str, include_comments: bool = False, process_includes:
|
|
|
337
338
|
del _ast_cache[cache_key]
|
|
338
339
|
|
|
339
340
|
# Read the file
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
code = f.read()
|
|
343
|
-
except Exception as e:
|
|
344
|
-
raise Exception(f"Error reading file {file}: {e}")
|
|
341
|
+
with open(file_path, 'r', encoding='utf-8') as f:
|
|
342
|
+
code = f.read()
|
|
345
343
|
|
|
346
344
|
# Create source map and process includes if requested
|
|
347
345
|
source_map = SourceMap()
|