mbeckerle commented on code in PR #947:
URL: https://github.com/apache/daffodil/pull/947#discussion_r1096339301
##########
daffodil-core/src/main/scala/org/apache/daffodil/dpath/DFDLExpressionParser.scala:
##########
@@ -270,34 +276,41 @@ class DFDLPathExpressionParser[T <: AnyRef](
RelativePathExpr)("path")
def RelativePathExpr: Parser[RelativePathExpression] = log(
- StepExpr ~ ("/" ~> StepExpr).* ^^ { case s1 ~ moreSteps =>
RelativePathExpression(s1 :: moreSteps, isEvaluatedAbove) } |
- StepExpr ~ ("//" ~> StepExpr).* ^^ { _ => context.SDE("'//' is
unsupported in DFDL Expression Syntax.") })("relativePath")
+ StepExpr ~ ("/" ~> StepExpr).* ^^ { case s1 ~ moreSteps =>
+ RelativePathExpression(s1 :: moreSteps, isEvaluatedAbove)
+ } |
+ StepExpr ~ ("//" ~> StepExpr).* ^^ { _ => context.SDE("'//' is
unsupported in DFDL Expression Syntax.") })(
+ "relativePath")
- def StepExpr: Parser[StepExpression] = log(AxisStep | VarRef ^^ { varRef =>
this.context.SDE("Variables cannot be used in path expressions. Error: $%s",
varRef.qnameString) })("step")
+ def StepExpr: Parser[StepExpression] = log(AxisStep | VarRef ^^ { varRef =>
+ this.context.SDE("Variables cannot be used in path expressions. Error:
$%s", varRef.qnameString)
+ })("step")
def AxisStep: Parser[StepExpression] =
Reverse | Forward
def Reverse = AbbrevReverseStep ~> Predicate.? ^^ { Up(_) } |
(SupportedReverseAxis ~> NodeTest) ~ Predicate.? ^^ { case qn ~ p => {
Up2(qn, p) } } |
- (UnsupportedReverseAxis ~ NodeTest) ~ Predicate.? ^^ { case name ~ _ =>
context.SDE("'%s::' is an unsupported axis in DFDL Expression Syntax.", name) }
+ (UnsupportedReverseAxis ~ NodeTest) ~ Predicate.? ^^ { case name ~ _ =>
+ context.SDE("'%s::' is an unsupported axis in DFDL Expression Syntax.",
name)
+ }
def Forward = ContextItemExpr ~> Predicate.? ^^ { Self(_) } |
SupportedForwardAxis ~ NodeTest ~ Predicate.? ^^ {
- case "self" ~ qn ~ p => Self2(qn, p)
+ case "self" ~ qn ~ p => Self2(qn, p)
case "child" ~ qn ~ p => NamedStep(qn, p)
// $COVERAGE-OFF$
case _ => Assert.impossible()
// $COVERAGE-ON$
} |
- UnsupportedForwardAxis ~ Predicate.? ^^ { case name ~ _ =>
context.SDE("'%s::' is an unsupported axis in DFDL Expression Syntax.", name) }
|
+ UnsupportedForwardAxis ~ Predicate.? ^^ { case name ~ _ =>
+ context.SDE("'%s::' is an unsupported axis in DFDL Expression Syntax.",
name)
+ } |
NodeTest ~ Predicate.? ^^ { case qn ~ p => { NamedStep(qn, p) } }
- def Predicate: Parser[PredicateExpression] = log(
- "[" ~> Expr <~ "]" ^^ { PredicateExpression(_) })("predicate")
+ def Predicate: Parser[PredicateExpression] = log("[" ~> Expr <~ "]" ^^ {
PredicateExpression(_) })("predicate")
Review Comment:
I withdraw the request about extends and with.
I took a look at the ElementBase trait and the indentation was not changed:
```
trait ElementBase
extends Term
with ElementLikeMixin
with LocalElementMixin
with Element_AnnotationMixin
with NillableMixin
with ElementBaseGrammarMixin
with ElementRuntimeValuedPropertiesMixin
with StringTextMixin
with NumberTextMixin
with CalendarTextMixin
with BooleanTextMixin
with TextNumberFormatMixin
with EmptyElementParsePolicyMixin
with TextStandardBaseMixin
with OverlapCheckMixin
with ElementBaseView {
```
So I'm fine with that.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]