From daf070a083cddaf0ac6c312fae48c900577a73f8 Mon Sep 17 00:00:00 2001 From: Hugo Thunnissen Date: Tue, 15 Aug 2023 18:31:03 +0200 Subject: [PATCH] Add missing struct definition --- phpinspect-project-struct.el | 72 ++++++++++++++++++++++++++++++++++++ 1 file changed, 72 insertions(+) create mode 100644 phpinspect-project-struct.el diff --git a/phpinspect-project-struct.el b/phpinspect-project-struct.el new file mode 100644 index 0000000..8baf6ff --- /dev/null +++ b/phpinspect-project-struct.el @@ -0,0 +1,72 @@ +;;; phpinspect-project-struct.el --- PHP parsing and completion package -*- lexical-binding: t; -*- + +;; Copyright (C) 2021 Free Software Foundation, Inc + +;; Author: Hugo Thunnissen +;; Keywords: php, languages, tools, convenience +;; Version: 0 + +;; This program is free software; you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; This program is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with this program. If not, see . + +;;; Commentary: + +;;; Code: + +(eval-when-compile + (declare-function phpinspect-make-dynamic-worker "phpinspect-worker.el")) + + +(cl-defstruct (phpinspect-project (:constructor phpinspect--make-project)) + (class-index (make-hash-table :test 'eq :size 100 :rehash-size 1.5) + :type hash-table + :documentation + "A `hash-table` that contains all of the currently +indexed classes in the project") + (function-index (make-hash-table :test 'eq :size 100 :rehash-size 2.0) + :type hash-table + :documentation + "A hash able that contains all of the currently indexed functions +in the project") + (function-token-index (make-hash-table :test 'eq :size 100 :rehash-size 1.5)) + (fs nil + :type phpinspect-fs + :documentation + "The filesystem object through which this project's files +can be accessed.") + (autoload nil + :type phpinspect-autoload + :documentation + "The autoload object through which this project's type +definitions can be retrieved") + (worker (progn + (unless (featurep 'phpinspect-worker) + (require 'phpinspect-worker)) + (phpinspect-make-dynamic-worker)) + :type phpinspect-worker + :documentation + "The worker that this project may queue tasks for") + (root nil + :type string + :documentation + "The root directory of this project") + (purged nil + :type boolean + :documentation "Whether or not the project has been purged or not. +Projects get purged when they are removed from the global cache.") + (file-watchers (make-hash-table :test #'equal :size 10000 :rehash-size 10000) + :type hash-table + :documentation "All active file watchers in this project, +indexed by the absolute paths of the files they're watching.")) + +(provide 'phpinspect-project-struct)