Skip to content

Commit

Permalink
Add documentation to code generator
Browse files Browse the repository at this point in the history
Ref. eng/recordflux/RecordFlux!1658
  • Loading branch information
treiher committed Aug 29, 2024
1 parent 9331e3c commit 6432c92
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions rflx/generator/parser.py
Original file line number Diff line number Diff line change
Expand Up @@ -1169,6 +1169,13 @@ def specification(field: Field) -> ProcedureSpecification:
)

def valid_message_condition(self, message: Message, well_formed: bool = False) -> Expr:
"""
Return condition representing the validity or well-formedness of the message.
Only the validity or well-formedness of the last fields and their field conditions are
checked. As a field can only be valid if its predecessors are valid, it is unnecessary to
check all fields.
"""
return expr_conv.to_ada(
expr.Or(
*[
Expand Down

0 comments on commit 6432c92

Please sign in to comment.