Skip to content

#770 PLCgen: Add type to expressions

Albert Hofkamp requested to merge 770-types-in-expr-2 into develop

Sorry for the delay of this text, but here it is:

Actually having a type in expressions is the next step. This patch does that for most kinds of expressions. The omissions are function calls and function blocks. For those cases it defaults to null type.

Function calls result types are not difficult to add, but I am still not sure how to handle function block variables and calls of them. Pending that, I opted not to compute types for calls currently.

Note that types aren't used much yet. It derives types for eg projections from them but nothing complains if types of expressions are null or inconsistent etc. I did however had a few unit tests to fix because of structural omissions. v, v := true is not valid CIF :p

  • Readable by commit.
  • I didn't fix layout or imports until the last commit.

Addresses #770

Edited by Albert Hofkamp

Merge request reports