Skip to content

Commit

Permalink
Improve documentation of session generator
Browse files Browse the repository at this point in the history
Ref. #292, #704
  • Loading branch information
treiher committed Jul 28, 2021
1 parent 6ea2770 commit b7f16ab
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions rflx/generator/session.py
Original file line number Diff line number Diff line change
Expand Up @@ -561,7 +561,7 @@ def _create_initialized_procedure(session: model.Session) -> UnitPart:
Variable(context_id(d.identifier) * "Buffer_First"),
First(const.TYPES_INDEX),
),
Equal(
Equal( # ISSUE: Componolit/RecordFlux#713
Variable(context_id(d.identifier) * "Buffer_Last"),
Add(First(const.TYPES_INDEX), Number(4095)),
),
Expand Down Expand Up @@ -1186,7 +1186,7 @@ def _assign_to_message_aggregate(
for s in [
expr.Size(v).substituted(self._substitution()).ada_expr()
]
for e in [
for e in [ # ISSUE: Componolit/RecordFlux#713
LessEqual(s, Number(4096 * 8)),
Equal(Mod(s, Size(const.TYPES_BYTE)), Number(0)),
]
Expand Down Expand Up @@ -2038,7 +2038,7 @@ def _if_valid_sequence(
"""
Ensure that sequence is valid.
A deffered exception is raised in case of an invalid sequence.
A deferred exception is raised in case of an invalid sequence.
"""
# ISSUE: Componlit/RecordFlux#569
return IfStatement(
Expand Down Expand Up @@ -2371,7 +2371,7 @@ def _declare_sequence_copy(
statements: Sequence[Statement],
exception_handler: ExceptionHandler = None,
) -> IfStatement:
"""Might raises a deferred exception."""
"""A deferred exception might be raised."""
# ISSUE: Componolit/RecordFlux#577
return self._if_valid_sequence(
sequence_type,
Expand Down Expand Up @@ -2467,7 +2467,7 @@ def _comprehension( # pylint: disable = too-many-arguments
selector: expr.Expr,
condition: expr.Expr,
) -> While:
"""Might raises a deferred exception."""
"""A deferred exception might be raised."""
assert not isinstance(selector, expr.MessageAggregate)

assert isinstance(target_type.element, (rty.Integer, rty.Enumeration, rty.Message))
Expand Down Expand Up @@ -2681,7 +2681,7 @@ def _allocate_buffer(identifier: rid.ID, initialization: Expr = None) -> Assignm
initialization
if initialization
else NamedAggregate(
(
( # ISSUE: Componolit/RecordFlux#713
ValueRange(
First(const.TYPES_INDEX),
Add(First(const.TYPES_INDEX), Number(4095)),
Expand Down Expand Up @@ -2715,7 +2715,7 @@ def _initialize_context(
)

def _copy_to_buffer(self, type_: ID, source_context: ID, target_buffer: ID) -> IfStatement:
"""Might raises a deferred exception."""
"""A deferred exception might be raised."""
self._session_context.used_types_body.add(const.TYPES_LENGTH)
return IfStatement(
[
Expand Down

0 comments on commit b7f16ab

Please sign in to comment.