You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: src/main/java/com/github/_1c_syntax/bsl/languageserver/utils/expressiontree/ExpressionTreeBuildingVisitor.java
+18-7Lines changed: 18 additions & 7 deletions
Original file line number
Diff line number
Diff line change
@@ -110,7 +110,11 @@ public ParseTree visitExpression(BSLParser.ExpressionContext ctx) {
110
110
}
111
111
112
112
varoperation = operands.peek();
113
-
assertoperation != null; // для спокойствия сонара
113
+
// В случае ошибок парсинга выражения, operation может быть null
114
+
if (operation == null) {
115
+
recursionLevel--;
116
+
returnctx;
117
+
}
114
118
115
119
if (operation.getRepresentingAst() == null) {
116
120
operation.setRepresentingAst(ctx);
@@ -127,12 +131,18 @@ public ParseTree visitExpression(BSLParser.ExpressionContext ctx) {
0 commit comments