Skip to content

Commit

Permalink
Merge pull request #2775 from ltwesley/master
Browse files Browse the repository at this point in the history
Fix for #2774 - Parser issue for keyword GOTO in Sybase ASE
  • Loading branch information
Lyeeedar committed Apr 21, 2020
2 parents 947764b + ab68aeb commit 1e2be7a
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

public class SybaseASEParser extends Parser {
public SybaseASEParser(Configuration configuration, ParsingContext parsingContext) {
super(configuration, parsingContext, 2);
super(configuration, parsingContext, 3);
}

@Override
Expand All @@ -36,9 +36,10 @@ protected Delimiter getDefaultDelimiter() {

@Override
protected boolean isDelimiter(String peek, ParserContext context, int col) {
return peek.length() == 2
return peek.length() >= 2
&& (peek.charAt(0) == 'G' || peek.charAt(0) == 'g')
&& (peek.charAt(1) == 'O' || peek.charAt(1) == 'o');
&& (peek.charAt(1) == 'O' || peek.charAt(1) == 'o')
&& (peek.length() == 2 || Character.isWhitespace(peek.charAt(2)));
}

@Override
Expand Down

0 comments on commit 1e2be7a

Please sign in to comment.