[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] externals/beardbolt 27e7bb714f 139/323: Add suppport for PHP
From: |
ELPA Syncer |
Subject: |
[elpa] externals/beardbolt 27e7bb714f 139/323: Add suppport for PHP |
Date: |
Thu, 9 Mar 2023 10:58:25 -0500 (EST) |
branch: externals/beardbolt
commit 27e7bb714f83c301820dbd915eeea5c0070a6924
Author: Antoine Brand <antoine597@gmail.com>
Commit: Antoine Brand <antoine597@gmail.com>
Add suppport for PHP
---
rmsbolt.el | 41 +++++++++++++++++++++++++++++++++++++++++
1 file changed, 41 insertions(+)
diff --git a/rmsbolt.el b/rmsbolt.el
index adc8cc78b0..36acab6ba0 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -483,6 +483,14 @@ Return value is quoted for passing to the shell."
">" output-filename)
" "))))
+(cl-defun rmsbolt--php-compile-cmd (&key src-buffer)
+ "Process a compile command for PHP it needs to have the vld.so module on."
+ (rmsbolt--with-files
+ src-buffer
+ (concat (buffer-local-value 'rmsbolt-command src-buffer)
+ " -dvld.active=1 -dvld.execute=0 -dvld.verbosity=1 "
+ src-filename " 2> " output-filename " > /dev/null")))
+
(cl-defun rmsbolt--hs-compile-cmd (&key src-buffer)
"Process a compile command for ghc."
(rmsbolt--with-files
@@ -601,6 +609,13 @@ Return value is quoted for passing to the shell."
:objdumper 'objdump
:compile-cmd-function #'rmsbolt--pony-compile-cmd
:disass-hidden-funcs nil))
+ (php-mode
+ . ,(make-rmsbolt-lang :compile-cmd "php"
+ :supports-asm t
+ :supports-disass nil
+ :compile-cmd-function #'rmsbolt--php-compile-cmd
+ :disass-hidden-funcs nil
+ :process-asm-custom-fn
#'rmsbolt--process-php-bytecode))
;; ONLY SUPPORTS PYTHON 3
(python-mode
. ,(make-rmsbolt-lang :compile-cmd "python3"
@@ -896,6 +911,32 @@ Argument SRC-BUFFER source buffer."
(push line result))))
(nreverse result)))
+(cl-defun rmsbolt--process-php-bytecode (_src-buffer asm-lines)
+ (let ((source-linum nil)
+ (state 'useless)
+ (current-line nil)
+ (result nil))
+ (dolist (line asm-lines)
+ (case state
+ ((text)
+ (push line result)
+ (when (string-match "^-+$" line)
+ (setq state 'asm)))
+ ((asm)
+ (cond
+ ((equalp "" line) (setq state 'useless) (push "" result))
+ ((string-match "^ *\\([0-9]+\\) +[0-9]+" line)
+ (setq current-line (string-to-number (match-string 1 line)))
+ (add-text-properties 0 (length line) `(rmsbolt-src-line
,current-line) line)
+ (push line result))
+ (t
+ (add-text-properties 0 (length line) `(rmsbolt-src-line
,current-line) line)
+ (push line result))))
+ (otherwise
+ (when (string-match "^filename:" line)
+ (setq state 'text)))))
+ (nreverse result)))
+
(cl-defun rmsbolt--process-python-bytecode (_src-buffer asm-lines)
(let ((source-linum nil)
(result nil))
- [elpa] externals/beardbolt 032b3d8eef 107/323: Add melpa badge, (continued)
- [elpa] externals/beardbolt 032b3d8eef 107/323: Add melpa badge, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt d1b0f7c2ba 118/323: Fix compilation warnings, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0ed6a01cd1 119/323: Fix initial run of emacs-lisp disassembler, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 77842a5f78 126/323: Add elisp support to docs, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c00d09a850 122/323: Use hashtables instead of lists as sets for labels used, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c009c2df44 130/323: Trim left side of strings to activate 'starting with period' opt, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9e38f2238b 135/323: Add support for functions as arguments to :compile-cmd, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 1cc069a121 132/323: Quote filenames before passing them as shell arguments, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 495d481a94 136/323: Move rmsbolt-command initialization to end, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 39055a3dc4 133/323: Fix disassembly of partial files in C/C++, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 27e7bb714f 139/323: Add suppport for PHP,
ELPA Syncer <=
- [elpa] externals/beardbolt 4b6abc5ef8 129/323: Optimize rmsbolt-process-src-asm-lines, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 67238e0272 138/323: Add rmsbolt-default-directory customization, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 9b2c85397c 149/323: Add texinfo version of docs, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt ec99a1aa31 146/323: Attempt to fix whitespace clearing on hot recompiles, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 5e389a88d9 152/323: Add rmsbolt splitter for splitting and mutating commands, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 0fbc3d3f09 153/323: Enable compile_commands.json parsing for c/cpp, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 743f9a68ec 158/323: Handle non absolute .file paths, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt 609f781b3a 165/323: Fix usages of when-let, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt c9f3b839e9 156/323: Add support for D, ELPA Syncer, 2023/03/09
- [elpa] externals/beardbolt a4f794666d 160/323: Add D to commentary, ELPA Syncer, 2023/03/09