Skip to content

Commit

Permalink
apply pr review
Browse files Browse the repository at this point in the history
Signed-off-by: Miguel Álvarez <[email protected]>
  • Loading branch information
GiviMAD committed Dec 5, 2023
1 parent 9c2adf5 commit 7d7d73c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -476,10 +476,8 @@ public InterpretationResult interpretAST(ResourceBundle language, ASTNode node,
}

/**
* Creates an item rule which two dynamic capture values on base of a head, a middle and an optional tail
* expression,
* where one of the values is an item
* name expression and the other a free captured value.
* Creates an item rule which two dynamic capture values on base of a head a middle and an optional tail expression,
* where one of the values is an item name expression and the other a free captured value.
* Rule will be restricted by the provided filter.
*
* @param item Item registering the rule.
Expand Down Expand Up @@ -524,11 +522,8 @@ public InterpretationResult interpretAST(ResourceBundle language, ASTNode node,
}

/**
* Creates a custom rule on base of a head and a tail expression, where the middle part of the new rule's
* expression
* will consist of a free command to be captured. Either the head expression or the tail expression should contain
* at least one {@link #cmd}
* generated expression.
* Creates a custom rule on base of a head and a tail expression,
* where the middle part of the new rule's expression will consist of a free command to be captured.
* Rule will be restricted to the provided item name.
*
* @param item Item target
Expand All @@ -541,7 +536,6 @@ protected Rule customDynamicRule(Item item, ItemFilter itemFilter, Object headEx
Expression tail = exp(tailExpression);
Expression expression = tail == null ? seq(headExpression, value(null))
: seq(headExpression, value(tail), tail);

HashMap<String, String> valuesByLabel = getItemValuesByLabel(item);
return new Rule(expression, itemFilter, isSilent) {
@Override
Expand Down Expand Up @@ -586,14 +580,10 @@ private HashMap<String, String> getItemValuesByLabel(Item item) {
}

/**
* Creates a custom rule on base of a head and a tail expression, where the middle part of the new rule's
* expression
* will consist of a free command to be captured. Either the head expression or the tail expression should contain
* at least one {@link #cmd}
* generated expression.
* Rule will be restricted to the provided item name.
* Creates a custom rule on base of a expression.
* The expression should contain at least one {@link #cmd} generated expression.
*
* @param itemFilter Filters the allowed items
* @param itemFilter Filters the allowed items.
* @param cmdExpression The expression.
* @return The created rule.
*/
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
ok = Okey.
ok = Ok.
sorry = Lo siento, no lo he entendido.
error = Lo sentimos, hubo un error inesperado.
multiple_objects = Hay más de un objeto con un nombre similar.
Expand Down

0 comments on commit 7d7d73c

Please sign in to comment.