Commit 7556bf78 authored by Maxime Perrotin's avatar Maxime Perrotin

Fix append operator

parent b0ba14df
......@@ -135,6 +135,10 @@ The background pattern was downloaded from www.subtlepatterns.com
Changelog
=========
2.0.39 (04/2019)
- Fix append operator when using substrings
- Fix unicode issue
2.0.38 (04/2019)
- Support advanced "in" expressions (e.g. "someVar in {enum1, enum2}",
or "someVar in {{a 4, b false}, {a 1, b true}}"
......
......@@ -3100,7 +3100,10 @@ def append_size(append):
else:
# Must be a variable of type SEQOF
_, inner, _ = expression(each, readonly=1)
result += u'{}.Length'.format(inner)
if isinstance (each, ogAST.PrimSubstring):
result += u"{}'Length".format(inner)
else:
result += u"{}.Length".format(inner)
return result
......
......@@ -141,7 +141,7 @@ except ImportError:
__all__ = ['opengeode', 'SDL_Scene', 'SDL_View', 'parse']
__version__ = '2.0.38'
__version__ = '2.0.39'
if hasattr(sys, 'frozen'):
# Detect if we are running on Windows (py2exe-generated)
......
......@@ -34,7 +34,7 @@ system og;
task foo := { true, false},
bar := {false, true, true, false, false};
/* CIF task (503, 334), (176, 35) */
task foo := foo // bar (0, idx - 1);
task foo := foo // bar (0, idx );
/* CIF NEXTSTATE (556, 384), (70, 35) */
NEXTSTATE wait;
/* CIF state (826, 332), (70, 35) */
......
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