Commit b06afd50 authored by Maxime Perrotin's avatar Maxime Perrotin

Add deep renaming for raw sequence and choice fields

mantis bug #842
parent 1f7dd258
......@@ -134,6 +134,9 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.0.25 (03/2019)
- fixed variable renaming bug in code generation for nested states
2.0.24 (03/2019)
- Add choice_to_int operator
......
......@@ -518,6 +518,16 @@ def _rename_prim_seq_of(ast, from_name, to_name):
for each in ast.value:
rename_everything(each, from_name, to_name)
@rename_everything.register(ogAST.PrimSequence)
def _rename_prim_seq_of(ast, from_name, to_name):
''' Values in the fields of a SEQUENCE '''
for each in ast.value.viewvalues():
rename_everything(each, from_name, to_name)
@rename_everything.register(ogAST.PrimChoiceItem)
def _rename_prim_seq_of(ast, from_name, to_name):
''' Value of a CHOICE item '''
rename_everything(ast.value['value'], from_name, to_name)
@rename_everything.register(ogAST.PrimIndex)
......
......@@ -141,7 +141,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '2.0.24'
__version__ = '2.0.25'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment