alteraparser 2.5.1__tar.gz → 2.5.2__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: alteraparser
3
- Version: 2.5.1
3
+ Version: 2.5.2
4
4
  Summary: Alteraparser is a library that provides functions to define a grammar that can be passed to a parser.
5
5
  Author: Thomas Bollmeier
6
6
  Author-email: Thomas Bollmeier <developer@thomas-bollmeier.de>
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "alteraparser"
3
- version = "2.5.1"
3
+ version = "2.5.2"
4
4
  authors = [
5
5
  { name = "Thomas Bollmeier", email = "developer@thomas-bollmeier.de" }
6
6
  ]
@@ -137,7 +137,10 @@ class AstTransformer:
137
137
  transformed_child = self.transform(child)
138
138
  ast.children[idx] = transformed_child
139
139
 
140
- return self._transformers[ast.name](ast) if ast.name in self._transformers else ast
140
+ saved_id = ast.id
141
+ transformed_ast = self._transformers[ast.name](ast) if ast.name in self._transformers else ast
142
+ transformed_ast.id = saved_id
143
+ return transformed_ast
141
144
 
142
145
 
143
146
  def transform_ast(ast_transformer: AstTransformer, ast_name: str):
File without changes
File without changes