[jOOQ/jOOQ#13523] Add support for parsing ! (bang) as equivalent to .
(dot) in MS Access identifiers
This commit is contained in:
parent
7c6618833c
commit
098a290387
@ -11754,19 +11754,26 @@ final class DefaultParseContext extends AbstractScope implements ParseContext {
|
||||
|
||||
// Avoid .. token in indexed for loops:
|
||||
// FOR i IN identifier1 .. identifier2 LOOP <...> END LOOP;
|
||||
if (peek('.') && !peek("..")) {
|
||||
List<Name> result = new ArrayList<>();
|
||||
result.add(identifier);
|
||||
if (peek('.') && !peek(".."))
|
||||
return parseNameQualified('.', identifier);
|
||||
|
||||
|
||||
|
||||
while (parseIf('.'))
|
||||
result.add(parseIdentifier());
|
||||
|
||||
return DSL.name(result.toArray(EMPTY_NAME));
|
||||
}
|
||||
else
|
||||
return identifier;
|
||||
}
|
||||
|
||||
private final Name parseNameQualified(char separator, Name firstPart) {
|
||||
List<Name> result = new ArrayList<>();
|
||||
result.add(firstPart);
|
||||
|
||||
while (parseIf(separator))
|
||||
result.add(parseIdentifier());
|
||||
|
||||
return DSL.name(result.toArray(EMPTY_NAME));
|
||||
}
|
||||
|
||||
private final QualifiedAsterisk parseQualifiedAsteriskIf() {
|
||||
int positionBeforeName = position();
|
||||
Name i1 = parseIdentifierIf();
|
||||
|
||||
Loading…
Reference in New Issue
Block a user