@@ -138,8 +138,9 @@ public BuildCSTVisitor(@NonNull StaticContext context) {
138
138
this .context = context ;
139
139
}
140
140
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
143
144
* ============================================================
144
145
*/
145
146
@ NonNull
@@ -155,8 +156,9 @@ protected IExpression handleExpr(ExprContext ctx) {
155
156
});
156
157
}
157
158
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
160
162
* =================================================================
161
163
*/
162
164
@@ -185,8 +187,9 @@ protected IExpression handleNumericLiteral(NumericliteralContext ctx) {
185
187
return retval ;
186
188
}
187
189
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
190
193
* ==================================================================
191
194
*/
192
195
@@ -198,8 +201,9 @@ protected IExpression handleVarref(VarrefContext ctx) {
198
201
getContext ().getVariablePrefixResolver ()));
199
202
}
200
203
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
203
207
* ====================================================================
204
208
*/
205
209
@@ -234,8 +238,9 @@ protected IExpression handleForexpr(ForexprContext ctx) {
234
238
return retval ;
235
239
}
236
240
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
239
244
* ====================================================================
240
245
*/
241
246
@@ -262,9 +267,12 @@ protected IExpression handleLet(LetexprContext context) {
262
267
return retval ;
263
268
}
264
269
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
+ * =====
268
276
*/
269
277
270
278
@ Override
@@ -302,8 +310,9 @@ protected IExpression handleQuantifiedexpr(QuantifiedexprContext ctx) {
302
310
return new Quantified (quantifier , vars , satisfies );
303
311
}
304
312
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
307
316
* =======================================================================
308
317
*/
309
318
@@ -333,27 +342,34 @@ protected IExpression handleArrowexpr(ArrowexprContext context) {
333
342
});
334
343
}
335
344
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
+ * ====
339
351
*/
340
352
341
353
@ Override
342
354
protected IExpression handleEmptyParenthesizedexpr (ParenthesizedexprContext ctx ) {
343
355
return EmptySequence .instance ();
344
356
}
345
357
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
+ * ========
349
364
*/
350
365
351
366
@ Override
352
367
protected IExpression handleContextitemexpr (ContextitemexprContext ctx ) {
353
368
return ContextItem .instance ();
354
369
}
355
370
356
- /* =========================================================================
371
+ /*
372
+ * =========================================================================
357
373
* Static Function Calls - https://www.w3.org/TR/xpath-31/#id-function-calls
358
374
* =========================================================================
359
375
*/
@@ -396,7 +412,8 @@ protected IExpression handleFunctioncall(FunctioncallContext ctx) {
396
412
.collect (Collectors .toUnmodifiableList ())));
397
413
}
398
414
399
- /* =========================================================================
415
+ /*
416
+ * =========================================================================
400
417
* Filter Expressions - https://www.w3.org/TR/xpath-31/#id-filter-expression
401
418
* =========================================================================
402
419
*/
@@ -461,8 +478,9 @@ protected IExpression handlePostfixexpr(PostfixexprContext ctx) {
461
478
}
462
479
return retval ;
463
480
}
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
466
484
* ======================================================================
467
485
*/
468
486
@@ -498,9 +516,12 @@ protected IExpression handlePathexpr(PathexprContext ctx) {
498
516
return retval ;
499
517
}
500
518
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
+ * ==========
504
525
*/
505
526
506
527
@ Override
@@ -528,8 +549,9 @@ protected IExpression handleRelativepathexpr(RelativepathexprContext context) {
528
549
});
529
550
}
530
551
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
533
555
* ================================================
534
556
*/
535
557
@@ -594,13 +616,15 @@ protected IExpression handleReversestep(ReversestepContext ctx) {
594
616
return new Step (axis , parseNodeTest (ctx .nodetest (), false ));
595
617
}
596
618
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
599
622
* =======================================================
600
623
*/
601
624
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
604
628
* =======================================================
605
629
*/
606
630
@@ -627,17 +651,16 @@ protected INameTestExpression parseNameTest(NametestContext ctx, boolean flag) {
627
651
@ Override
628
652
protected Wildcard handleWildcard (WildcardContext ctx ) {
629
653
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 ) {
633
656
// specified prefix, any local-name
634
657
String prefix = ctx .NCName ().getText ();
635
658
String namespace = getContext ().lookupNamespaceForPrefix (prefix );
636
659
if (namespace == null ) {
637
660
throw new IllegalStateException (String .format ("Prefix '%s' did not map to a namespace." , prefix ));
638
661
}
639
662
matcher = new Wildcard .MatchAnyLocalName (namespace );
640
- } else if (( node = ctx .SC () ) != null ) {
663
+ } else if (ctx .SC () != null ) {
641
664
// any prefix, specified local-name
642
665
matcher = new Wildcard .MatchAnyNamespace (ctx .NCName ().getText ());
643
666
} else {
@@ -651,7 +674,8 @@ protected Wildcard handleWildcard(WildcardContext ctx) {
651
674
return new Wildcard (matcher );
652
675
}
653
676
654
- /* ======================================================================
677
+ /*
678
+ * ======================================================================
655
679
* Predicates within Steps - https://www.w3.org/TR/xpath-31/#id-predicate
656
680
* ======================================================================
657
681
*/
@@ -667,8 +691,9 @@ protected IExpression handleAxisstep(AxisstepContext ctx) {
667
691
return predicates .isEmpty () ? step : new PredicateExpression (step , predicates );
668
692
}
669
693
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
672
697
* ===========================================================
673
698
*/
674
699
@@ -691,7 +716,8 @@ protected IExpression handleAbbrevreversestep(AbbrevreversestepContext ctx) {
691
716
return Axis .PARENT ;
692
717
}
693
718
694
- /* ======================================================================
719
+ /*
720
+ * ======================================================================
695
721
* Constructing Sequences - https://www.w3.org/TR/xpath-31/#construct_seq
696
722
* ======================================================================
697
723
*/
@@ -706,7 +732,8 @@ protected IExpression handleRangeexpr(RangeexprContext ctx) {
706
732
return new Range (left , right );
707
733
}
708
734
709
- /* ========================================================================
735
+ /*
736
+ * ========================================================================
710
737
* Combining Node Sequences - https://www.w3.org/TR/xpath-31/#combining_seq
711
738
* ========================================================================
712
739
*/
@@ -744,7 +771,8 @@ protected IExpression handleIntersectexceptexpr(IntersectexceptexprContext conte
744
771
});
745
772
}
746
773
747
- /* ======================================================================
774
+ /*
775
+ * ======================================================================
748
776
* Arithmetic Expressions - https://www.w3.org/TR/xpath-31/#id-arithmetic
749
777
* ======================================================================
750
778
*/
@@ -835,9 +863,12 @@ protected IExpression handleUnaryexpr(UnaryexprContext ctx) {
835
863
return retval ;
836
864
}
837
865
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
+ * ===========
841
872
*/
842
873
843
874
@ Override
@@ -848,7 +879,8 @@ protected IExpression handleStringconcatexpr(StringconcatexprContext ctx) {
848
879
});
849
880
}
850
881
851
- /* =======================================================================
882
+ /*
883
+ * =======================================================================
852
884
* Comparison Expressions - https://www.w3.org/TR/xpath-31/#id-comparisons
853
885
* =======================================================================
854
886
*/
@@ -924,7 +956,8 @@ protected IExpression handleComparisonexpr(ComparisonexprContext ctx) { // NOPMD
924
956
return retval ;
925
957
}
926
958
927
- /* ============================================================================
959
+ /*
960
+ * ============================================================================
928
961
* Logical Expressions - https://www.w3.org/TR/xpath-31/#id-logical-expressions
929
962
* ============================================================================
930
963
*/
@@ -945,7 +978,8 @@ protected IExpression handleAndexpr(AndexprContext ctx) {
945
978
});
946
979
}
947
980
948
- /* =========================================================================
981
+ /*
982
+ * =========================================================================
949
983
* Conditional Expressions - https://www.w3.org/TR/xpath-31/#id-conditionals
950
984
* =========================================================================
951
985
*/
@@ -959,7 +993,8 @@ protected IExpression handleIfexpr(IfexprContext ctx) {
959
993
return new If (testExpr , thenExpr , elseExpr );
960
994
}
961
995
962
- /* =========================================================================
996
+ /*
997
+ * =========================================================================
963
998
* Simple map operator (!) - https://www.w3.org/TR/xpath-31/#id-map-operator
964
999
* =========================================================================
965
1000
*/
0 commit comments