You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We have a model that has a variable name that includes parentheses, and we can't easily change it for [reasons]. This case is not currently handled correctly in SDE, so it results in incorrect generated code.
There are actually two problems:
During preprocessing when generating the key used for flattening, we split on (, but this code doesn't account for the case where the ( appears inside a quoted variable name. In the case of the sde flatten command, this means if you have two variables (Var (1) and Var (2), only the first one will be preserved in the preprocessed model.
During parsing, the canonicalId function does not transform paren characters to underscore like we do for other punctuation, so the generated C/JS code will include for example _var_(1) which is not a valid identifier.
The text was updated successfully, but these errors were encountered:
We have a model that has a variable name that includes parentheses, and we can't easily change it for [reasons]. This case is not currently handled correctly in SDE, so it results in incorrect generated code.
There are actually two problems:
(
, but this code doesn't account for the case where the(
appears inside a quoted variable name. In the case of thesde flatten
command, this means if you have two variables (Var (1)
andVar (2)
, only the first one will be preserved in the preprocessed model.canonicalId
function does not transform paren characters to underscore like we do for other punctuation, so the generated C/JS code will include for example_var_(1)
which is not a valid identifier.The text was updated successfully, but these errors were encountered: