emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] externals/beardbolt 22810d69a7 062/323: Add docs for python


From: ELPA Syncer
Subject: [elpa] externals/beardbolt 22810d69a7 062/323: Add docs for python
Date: Thu, 9 Mar 2023 10:58:16 -0500 (EST)

branch: externals/beardbolt
commit 22810d69a7128668e8bdb66542e50c2a25c1ad2c
Author: Jay Kamat <jaygkamat@gmail.com>
Commit: Jay Kamat <jaygkamat@gmail.com>

    Add docs for python
---
 README.org          | 13 +++++++++++++
 rmsbolt.el          |  6 ++++--
 starters/rmsbolt.py | 16 ++++++++++++++++
 3 files changed, 33 insertions(+), 2 deletions(-)

diff --git a/README.org b/README.org
index 63206249c6..c1187c23a7 100644
--- a/README.org
+++ b/README.org
@@ -38,6 +38,11 @@ add it..
             :repo "jgkamat/rmsbolt"))
 #+END_SRC
 
+* Running
+ Once installed, use the ~rmsbolt-lang~ functions to generate starter files, or
+ enable ~rmsbolt-mode~ in a supported language. Then run ~rmsbolt-compile~ or
+ use the default ~C-c C-c~ binding.
+
 * Demo
 
 ** C/C++
@@ -54,6 +59,14 @@ demangling is done with rustfilt if available
 
 
[[https://s25.postimg.cc/h7npjnnun/output-2018-08-01-19_30_52.gif][https://s25.postimg.cc/h7npjnnun/output-2018-08-01-19_30_52.gif]]
 
+** Python
+
+Support for bytecode viewing. Python dosen't have many options, so most
+tweakables will not work. Python 3.7 is required for recursion into functions.
+Python 2 is unsupported.
+
+[[https://s25.postimg.cc/594qd9o4v/output-2018-08-04-18_07_45.gif][https://s25.postimg.cc/594qd9o4v/output-2018-08-04-18_07_45.gif]]
+
 ** Common Lisp
 
 No support for source->asm matching or filtering.
diff --git a/rmsbolt.el b/rmsbolt.el
index c3db0cce83..6de3344d13 100644
--- a/rmsbolt.el
+++ b/rmsbolt.el
@@ -896,7 +896,8 @@ Outputs assembly file if ASM."
          (src-file-name
           (when rmsbolt-dir
             (expand-file-name (rmsbolt-l-starter-file-name lang-def) (concat 
rmsbolt-dir "starters/"))))
-         (src-file-exists (file-exists-p src-file-name)))
+         (src-file-exists (when src-file-name
+                            (file-exists-p src-file-name))))
     (if (not src-file-exists)
         (error "Could not find starter files! Are you sure the starter/ folder 
is available?")
       (find-file file-name)
@@ -916,7 +917,8 @@ Outputs assembly file if ASM."
 (rmsbolt-defstarter "c++" 'c++-mode)
 (rmsbolt-defstarter "ocaml" 'tuareg-mode)
 (rmsbolt-defstarter "cl" 'lisp-mode)
-(rmsbolt-defstarter "rust" 'rust-mode)
+(rmsbolt-defstarter "rust " 'rust-mode)
+(rmsbolt-defstarter "python" 'python-mode)
 
 ;;;; Font lock matcher
 (defun rmsbolt--goto-line (line)
diff --git a/starters/rmsbolt.py b/starters/rmsbolt.py
new file mode 100644
index 0000000000..7e7444f36c
--- /dev/null
+++ b/starters/rmsbolt.py
@@ -0,0 +1,16 @@
+# python rmsbolt starter file
+#
+# Local Variables:
+# rmsbolt-command: "python3"
+# End:
+
+RMS_MAP = {
+    'R': 3,
+    'M': 3,
+    'S': 3
+}
+
+def isRMS(char):
+    return 3
+
+print(isRMS('R'))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]