-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Constants validation (fb instances not allowed #295, scoped const exp…
…ressions #292) (#306) * validate illegal fb and class consts fb-instances and class-instances cannot be declared as constants. the implementation does not allow to declare a const of type FB or Class, an array of FBs or Classes or a struct that contains a field of type FB or Class. Furthermore the DataTypeInformation::Struct now contains a new field: 'source' that indicates where this struct comes from. It is either an original Declaration (TYPE x : STRUCT ... END_TYPE) or it was generated from a POU(PouType). With this field it is now very easy to see what a DataType offers (is it an FB or Class, can I call it, etc.) closes #295 * add scope to unresolved const expressions the additional scope parameter in const_evaluator::evaluate(...) helps the evaluator to distinguish between global constants and POU-local ones. When resolving const expressions the given scope will be used to resolve references. therefore every ConstExpression holds an optional scope when it is registered (see enum ConstExpression). closes #292
- Loading branch information
Showing
11 changed files
with
291 additions
and
53 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.