@@ -138,8 +138,9 @@ public BuildCSTVisitor(@NonNull StaticContext context) {
138138 this .context = context ;
139139 }
140140
141- /* ============================================================
142- * Expressions - https://www.w3.org/TR/xpath-31/#id-expressions
141+ /*
142+ * ============================================================ Expressions -
143+ * https://www.w3.org/TR/xpath-31/#id-expressions
143144 * ============================================================
144145 */
145146 @ NonNull
@@ -155,8 +156,9 @@ protected IExpression handleExpr(ExprContext ctx) {
155156 });
156157 }
157158
158- /* =================================================================
159- * Literal Expressions - https://www.w3.org/TR/xpath-31/#id-literals
159+ /*
160+ * ================================================================= Literal
161+ * Expressions - https://www.w3.org/TR/xpath-31/#id-literals
160162 * =================================================================
161163 */
162164
@@ -185,8 +187,9 @@ protected IExpression handleNumericLiteral(NumericliteralContext ctx) {
185187 return retval ;
186188 }
187189
188- /* ==================================================================
189- * Variable References - https://www.w3.org/TR/xpath-31/#id-variables
190+ /*
191+ * ================================================================== Variable
192+ * References - https://www.w3.org/TR/xpath-31/#id-variables
190193 * ==================================================================
191194 */
192195
@@ -198,8 +201,9 @@ protected IExpression handleVarref(VarrefContext ctx) {
198201 getContext ().getVariablePrefixResolver ()));
199202 }
200203
201- /* ====================================================================
202- * For Expressions - https://www.w3.org/TR/xpath-31/#id-for-expressions
204+ /*
205+ * ==================================================================== For
206+ * Expressions - https://www.w3.org/TR/xpath-31/#id-for-expressions
203207 * ====================================================================
204208 */
205209
@@ -234,8 +238,9 @@ protected IExpression handleForexpr(ForexprContext ctx) {
234238 return retval ;
235239 }
236240
237- /* ====================================================================
238- * Let Expressions - https://www.w3.org/TR/xpath-31/#id-let-expressions
241+ /*
242+ * ==================================================================== Let
243+ * Expressions - https://www.w3.org/TR/xpath-31/#id-let-expressions
239244 * ====================================================================
240245 */
241246
@@ -262,9 +267,12 @@ protected IExpression handleLet(LetexprContext context) {
262267 return retval ;
263268 }
264269
265- /* ==================================================================================
266- * Quantified Expressions - https://www.w3.org/TR/xpath-31/#id-quantified-expressions
267- * ==================================================================================
270+ /*
271+ * =============================================================================
272+ * ===== Quantified Expressions -
273+ * https://www.w3.org/TR/xpath-31/#id-quantified-expressions
274+ * =============================================================================
275+ * =====
268276 */
269277
270278 @ Override
@@ -302,8 +310,9 @@ protected IExpression handleQuantifiedexpr(QuantifiedexprContext ctx) {
302310 return new Quantified (quantifier , vars , satisfies );
303311 }
304312
305- /* =======================================================================
306- * Arrow operator (=>) - https://www.w3.org/TR/xpath-31/#id-arrow-operator
313+ /*
314+ * ======================================================================= Arrow
315+ * operator (=>) - https://www.w3.org/TR/xpath-31/#id-arrow-operator
307316 * =======================================================================
308317 */
309318
@@ -333,27 +342,34 @@ protected IExpression handleArrowexpr(ArrowexprContext context) {
333342 });
334343 }
335344
336- /* =================================================================================
337- * Parenthesized Expressions - https://www.w3.org/TR/xpath-31/#id-paren-expressions
338- * =================================================================================
345+ /*
346+ * =============================================================================
347+ * ==== Parenthesized Expressions -
348+ * https://www.w3.org/TR/xpath-31/#id-paren-expressions
349+ * =============================================================================
350+ * ====
339351 */
340352
341353 @ Override
342354 protected IExpression handleEmptyParenthesizedexpr (ParenthesizedexprContext ctx ) {
343355 return EmptySequence .instance ();
344356 }
345357
346- /* =====================================================================================
347- * Context Item Expression - https://www.w3.org/TR/xpath-31/#id-context-item-expression
348- * =====================================================================================
358+ /*
359+ * =============================================================================
360+ * ======== Context Item Expression -
361+ * https://www.w3.org/TR/xpath-31/#id-context-item-expression
362+ * =============================================================================
363+ * ========
349364 */
350365
351366 @ Override
352367 protected IExpression handleContextitemexpr (ContextitemexprContext ctx ) {
353368 return ContextItem .instance ();
354369 }
355370
356- /* =========================================================================
371+ /*
372+ * =========================================================================
357373 * Static Function Calls - https://www.w3.org/TR/xpath-31/#id-function-calls
358374 * =========================================================================
359375 */
@@ -396,7 +412,8 @@ protected IExpression handleFunctioncall(FunctioncallContext ctx) {
396412 .collect (Collectors .toUnmodifiableList ())));
397413 }
398414
399- /* =========================================================================
415+ /*
416+ * =========================================================================
400417 * Filter Expressions - https://www.w3.org/TR/xpath-31/#id-filter-expression
401418 * =========================================================================
402419 */
@@ -461,8 +478,9 @@ protected IExpression handlePostfixexpr(PostfixexprContext ctx) {
461478 }
462479 return retval ;
463480 }
464- /* ======================================================================
465- * Path Expressions - https://www.w3.org/TR/xpath-31/#id-path-expressions
481+ /*
482+ * ====================================================================== Path
483+ * Expressions - https://www.w3.org/TR/xpath-31/#id-path-expressions
466484 * ======================================================================
467485 */
468486
@@ -498,9 +516,12 @@ protected IExpression handlePathexpr(PathexprContext ctx) {
498516 return retval ;
499517 }
500518
501- /* =======================================================================================
502- * RelativePath Expressions - https://www.w3.org/TR/xpath-31/#id-relative-path-expressions
503- * =======================================================================================
519+ /*
520+ * =============================================================================
521+ * ========== RelativePath Expressions -
522+ * https://www.w3.org/TR/xpath-31/#id-relative-path-expressions
523+ * =============================================================================
524+ * ==========
504525 */
505526
506527 @ Override
@@ -528,8 +549,9 @@ protected IExpression handleRelativepathexpr(RelativepathexprContext context) {
528549 });
529550 }
530551
531- /* ================================================
532- * Steps - https://www.w3.org/TR/xpath-31/#id-steps
552+ /*
553+ * ================================================ Steps -
554+ * https://www.w3.org/TR/xpath-31/#id-steps
533555 * ================================================
534556 */
535557
@@ -594,13 +616,15 @@ protected IExpression handleReversestep(ReversestepContext ctx) {
594616 return new Step (axis , parseNodeTest (ctx .nodetest (), false ));
595617 }
596618
597- /* =======================================================
598- * Node Tests - https://www.w3.org/TR/xpath-31/#node-tests
619+ /*
620+ * ======================================================= Node Tests -
621+ * https://www.w3.org/TR/xpath-31/#node-tests
599622 * =======================================================
600623 */
601624
602- /* =======================================================
603- * Node Tests - https://www.w3.org/TR/xpath-31/#node-tests
625+ /*
626+ * ======================================================= Node Tests -
627+ * https://www.w3.org/TR/xpath-31/#node-tests
604628 * =======================================================
605629 */
606630
@@ -627,17 +651,16 @@ protected INameTestExpression parseNameTest(NametestContext ctx, boolean flag) {
627651 @ Override
628652 protected Wildcard handleWildcard (WildcardContext ctx ) {
629653 Predicate <IDefinitionNodeItem <?, ?>> matcher = null ;
630- TerminalNode node ;
631- if ((node = ctx .STAR ()) == null ) {
632- if ((node = ctx .CS ()) != null ) {
654+ if (ctx .STAR () == null ) {
655+ if (ctx .CS () != null ) {
633656 // specified prefix, any local-name
634657 String prefix = ctx .NCName ().getText ();
635658 String namespace = getContext ().lookupNamespaceForPrefix (prefix );
636659 if (namespace == null ) {
637660 throw new IllegalStateException (String .format ("Prefix '%s' did not map to a namespace." , prefix ));
638661 }
639662 matcher = new Wildcard .MatchAnyLocalName (namespace );
640- } else if (( node = ctx .SC () ) != null ) {
663+ } else if (ctx .SC () != null ) {
641664 // any prefix, specified local-name
642665 matcher = new Wildcard .MatchAnyNamespace (ctx .NCName ().getText ());
643666 } else {
@@ -651,7 +674,8 @@ protected Wildcard handleWildcard(WildcardContext ctx) {
651674 return new Wildcard (matcher );
652675 }
653676
654- /* ======================================================================
677+ /*
678+ * ======================================================================
655679 * Predicates within Steps - https://www.w3.org/TR/xpath-31/#id-predicate
656680 * ======================================================================
657681 */
@@ -667,8 +691,9 @@ protected IExpression handleAxisstep(AxisstepContext ctx) {
667691 return predicates .isEmpty () ? step : new PredicateExpression (step , predicates );
668692 }
669693
670- /* ===========================================================
671- * Abbreviated Syntax - https://www.w3.org/TR/xpath-31/#abbrev
694+ /*
695+ * =========================================================== Abbreviated
696+ * Syntax - https://www.w3.org/TR/xpath-31/#abbrev
672697 * ===========================================================
673698 */
674699
@@ -691,7 +716,8 @@ protected IExpression handleAbbrevreversestep(AbbrevreversestepContext ctx) {
691716 return Axis .PARENT ;
692717 }
693718
694- /* ======================================================================
719+ /*
720+ * ======================================================================
695721 * Constructing Sequences - https://www.w3.org/TR/xpath-31/#construct_seq
696722 * ======================================================================
697723 */
@@ -706,7 +732,8 @@ protected IExpression handleRangeexpr(RangeexprContext ctx) {
706732 return new Range (left , right );
707733 }
708734
709- /* ========================================================================
735+ /*
736+ * ========================================================================
710737 * Combining Node Sequences - https://www.w3.org/TR/xpath-31/#combining_seq
711738 * ========================================================================
712739 */
@@ -744,7 +771,8 @@ protected IExpression handleIntersectexceptexpr(IntersectexceptexprContext conte
744771 });
745772 }
746773
747- /* ======================================================================
774+ /*
775+ * ======================================================================
748776 * Arithmetic Expressions - https://www.w3.org/TR/xpath-31/#id-arithmetic
749777 * ======================================================================
750778 */
@@ -835,9 +863,12 @@ protected IExpression handleUnaryexpr(UnaryexprContext ctx) {
835863 return retval ;
836864 }
837865
838- /* ========================================================================================
839- * String Concatenation Expressions - https://www.w3.org/TR/xpath-31/#id-string-concat-expr
840- * ========================================================================================
866+ /*
867+ * =============================================================================
868+ * =========== String Concatenation Expressions -
869+ * https://www.w3.org/TR/xpath-31/#id-string-concat-expr
870+ * =============================================================================
871+ * ===========
841872 */
842873
843874 @ Override
@@ -848,7 +879,8 @@ protected IExpression handleStringconcatexpr(StringconcatexprContext ctx) {
848879 });
849880 }
850881
851- /* =======================================================================
882+ /*
883+ * =======================================================================
852884 * Comparison Expressions - https://www.w3.org/TR/xpath-31/#id-comparisons
853885 * =======================================================================
854886 */
@@ -924,7 +956,8 @@ protected IExpression handleComparisonexpr(ComparisonexprContext ctx) { // NOPMD
924956 return retval ;
925957 }
926958
927- /* ============================================================================
959+ /*
960+ * ============================================================================
928961 * Logical Expressions - https://www.w3.org/TR/xpath-31/#id-logical-expressions
929962 * ============================================================================
930963 */
@@ -945,7 +978,8 @@ protected IExpression handleAndexpr(AndexprContext ctx) {
945978 });
946979 }
947980
948- /* =========================================================================
981+ /*
982+ * =========================================================================
949983 * Conditional Expressions - https://www.w3.org/TR/xpath-31/#id-conditionals
950984 * =========================================================================
951985 */
@@ -959,7 +993,8 @@ protected IExpression handleIfexpr(IfexprContext ctx) {
959993 return new If (testExpr , thenExpr , elseExpr );
960994 }
961995
962- /* =========================================================================
996+ /*
997+ * =========================================================================
963998 * Simple map operator (!) - https://www.w3.org/TR/xpath-31/#id-map-operator
964999 * =========================================================================
9651000 */
0 commit comments