@Override
  public String parseScope(final Lexer lexer) {
    if (lexer.getTokenType() != ScopeTokenTypes.IDENTIFIER) return PatternPackageSet.Scope.ANY.getId();
    String id = getTokenText(lexer);
    PatternPackageSet.Scope scope;
    if (id.trim().isEmpty()) {
      scope = PatternPackageSet.Scope.ANY;
    }
    else {
      scope = ContainerUtil.find(PatternPackageSet.Scope.values(), value -> value.getId().equals(id));
    }
    final CharSequence buf = lexer.getBufferSequence();
    int end = lexer.getTokenEnd();
    int bufferEnd = lexer.getBufferEnd();

    if (scope == PatternPackageSet.Scope.ANY || end >= bufferEnd || buf.charAt(end) != ':' && buf.charAt(end) != '[') {
      return PatternPackageSet.Scope.ANY.getId();
    }

    if (scope != null) {
      lexer.advance();
      return scope.getId();
    }
    return null;
  }
@Override
  public String parseScope(final Lexer lexer)