|
1 | 1 | /* |
2 | | - * Copyright (c) 2022, 2023, Oracle and/or its affiliates. All rights reserved. |
| 2 | + * Copyright (c) 2022, 2024, Oracle and/or its affiliates. All rights reserved. |
3 | 3 | * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. |
4 | 4 | * |
5 | 5 | * The Universal Permissive License (UPL), Version 1.0 |
@@ -102,9 +102,9 @@ final class Validator implements SSTreeVisitor<Void> { |
102 | 102 | private Validator() { |
103 | 103 | } |
104 | 104 |
|
105 | | - ////////////////////////////// |
| 105 | + /*- |
106 | 106 | // ModTy validation |
107 | | - ////////////////////////////// |
| 107 | + */ |
108 | 108 |
|
109 | 109 | // Equivalent of _PyAST_Validate - entry point of the validation |
110 | 110 | static void validateMod(ModTy mod) { |
@@ -137,9 +137,9 @@ public Void visit(ModTy.FunctionType node) { |
137 | 137 | return null; |
138 | 138 | } |
139 | 139 |
|
140 | | - ////////////////////////////// |
| 140 | + /*- |
141 | 141 | // StmtTy validation |
142 | | - ////////////////////////////// |
| 142 | + */ |
143 | 143 |
|
144 | 144 | // Equivalent of validate_stmt |
145 | 145 | private void validateStmt(StmtTy stmt) { |
@@ -399,9 +399,9 @@ public Void visit(StmtTy.Continue node) { |
399 | 399 | return null; |
400 | 400 | } |
401 | 401 |
|
402 | | - ////////////////////////////// |
| 402 | + /*- |
403 | 403 | // ExprTy validation |
404 | | - ////////////////////////////// |
| 404 | + */ |
405 | 405 |
|
406 | 406 | // Equivalent of validate_expr |
407 | 407 | private void validateExpr(ExprTy expr, ExprContextTy context) { |
@@ -667,9 +667,9 @@ public Void visit(ExprTy.Name node) { |
667 | 667 | return null; |
668 | 668 | } |
669 | 669 |
|
670 | | - ////////////////////////////// |
| 670 | + /*- |
671 | 671 | // PatternTy validation |
672 | | - ////////////////////////////// |
| 672 | + */ |
673 | 673 |
|
674 | 674 | boolean isStarPatternOk; |
675 | 675 |
|
@@ -871,9 +871,9 @@ public Void visit(MatchCaseTy node) { |
871 | 871 | return null; |
872 | 872 | } |
873 | 873 |
|
874 | | - ////////////////////////////// |
| 874 | + /*- |
875 | 875 | // Other visitors |
876 | | - ////////////////////////////// |
| 876 | + */ |
877 | 877 |
|
878 | 878 | @Override |
879 | 879 | public Void visit(ComprehensionTy node) { |
@@ -948,9 +948,9 @@ public Void visit(TypeIgnoreTy.TypeIgnore node) { |
948 | 948 | return null; |
949 | 949 | } |
950 | 950 |
|
951 | | - ////////////////////////////// |
| 951 | + /*- |
952 | 952 | // Validation of sequences |
953 | | - ////////////////////////////// |
| 953 | + */ |
954 | 954 |
|
955 | 955 | // Equivalent of validate_stmts |
956 | 956 | private void validateStmts(StmtTy[] stmts) { |
@@ -1039,9 +1039,9 @@ private void validateComprehension(ComprehensionTy[] generators) { |
1039 | 1039 | } |
1040 | 1040 | } |
1041 | 1041 |
|
1042 | | - ////////////////////////////// |
| 1042 | + /*- |
1043 | 1043 | // Helpers |
1044 | | - ////////////////////////////// |
| 1044 | + */ |
1045 | 1045 |
|
1046 | 1046 | // Equivalent of asdl_seq_LEN |
1047 | 1047 | private static int seqLen(Object[] seq) { |
|
0 commit comments