Skip to content

Commit

Permalink
Improve Batch iterator variable recognizing
Browse files Browse the repository at this point in the history
line breaking: ^
  • Loading branch information
lifenjoiner committed Jun 27, 2021
1 parent 37949e0 commit 85cec18
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions scintilla/lexers/LexBatch.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -107,13 +107,23 @@ bool IsStringArgumentEnd(const StyleContext &sc, int outerStyle, Command command

bool GetValidIterator(StyleContext &sc) {
Sci_Position start = sc.styler.GetStartSegment();
Sci_Position end = sc.styler.LineEnd(sc.currentLine);
size_t len = end - start + 1;
Sci_Position end;
Sci_Line currentLine;
size_t len;
char *s = NULL, *p;
std::set<int> tokensSet;
bool gotComma = false;
bool ret = false;

for (currentLine = sc.currentLine; currentLine < sc.lineDocEnd; currentLine++) {
char sEnd[2];
end = sc.styler.LineEnd(currentLine);
sc.styler.GetRange(end - 1, end, sEnd, 2);
if (*sEnd != '^') {
break;
}
}
len = end - start + 1;
if (len <= 1) {
return false;
}
Expand Down

0 comments on commit 85cec18

Please # to comment.