]> gitweb.factorcode.org Git - factor.git/commitdiff
FUEL: Recognised parenthesised forms (e.g., stack effects) as syntactic constructs.
authorJose A. Ortega Ruiz <jao@gnu.org>
Sat, 14 Feb 2009 12:44:12 +0000 (13:44 +0100)
committerJose A. Ortega Ruiz <jao@gnu.org>
Sat, 14 Feb 2009 12:44:12 +0000 (13:44 +0100)
misc/fuel/fuel-edit.el
misc/fuel/fuel-font-lock.el
misc/fuel/fuel-syntax.el

index 941f57140ec44af46350defd2c31196fa24d3e02..f89e2b3eb830817f0e834fdeac4267ee84c7c3df 100644 (file)
@@ -65,7 +65,6 @@
 ;;; Editing commands:
 
 (defvar fuel-edit--word-history nil)
-(defvar fuel-edit--previous-location nil)
 
 (defun fuel-edit-vocabulary (&optional refresh vocab)
   "Visits vocabulary file in Emacs.
@@ -129,7 +128,7 @@ was last invoked."
   (interactive)
   (condition-case nil
       (pop-tag-mark)
-    (error "No previous location for find word or vocab invokation")))
+    (error "No previous location for find word or vocab invocation")))
 
 (defvar fuel-edit--buffer-history nil)
 
index 86ae94fe8af52894e01f8b36165cde1f321f93bc..f3b510fdd97003f313ae63b983758dbc80836b97 100644 (file)
@@ -88,7 +88,6 @@
                      (t 'default))))
             ((or (char-equal c ?U) (char-equal c ?C))
              'factor-font-lock-parsing-word)
-            ((char-equal c ?\() 'factor-font-lock-stack-effect)
             ((char-equal c ?\") 'factor-font-lock-string)
             (t 'factor-font-lock-comment)))))
 
index 80bfd0afcb0fb3f9c0d89b1721aed3254a4317ec..67341120c1e1d8bd87da7c9165f36a2f84da2dea 100644 (file)
   (fuel-syntax--second-word-regex '("&:" "SYMBOL:" "VAR:")))
 
 (defconst fuel-syntax--stack-effect-regex
-  "\\( ( .* )\\)\\|\\( (( .* ))\\)")
+  "\\( ( [^\n]* )\\)\\|\\( (( [^\n]* ))\\)")
 
 (defconst fuel-syntax--using-lines-regex "^USING: +\\([^;]+\\);")
 
     (modify-syntax-entry ?\r " " table)
     (modify-syntax-entry ?\  " " table)
     (modify-syntax-entry ?\n " " table)
+    (modify-syntax-entry ?\( "()" table)
+    (modify-syntax-entry ?\) ")(" table)
     table))
 
 (defconst fuel-syntax--syntactic-keywords
     ;; Comments:
     ("\\_<\\(#?!\\) .*\\(\n\\|$\\)" (1 "<") (2 ">"))
     ("\\_<\\(#?!\\)\\(\n\\|$\\)" (1 "<") (2 ">"))
-    (" \\((\\)( \\([^\n]*\\) )\\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
-    (" \\((\\) \\([^\n]*\\) \\()\\)\\( \\|\n\\)" (1 "<b") (2 "w") (3 ">b"))
     ;; Strings
     ("\\( \\|^\\)\\(DLL\\|P\\|SBUF\\)\\(\"\\)\\([^\n\r\f\\\"]\\|\\\\.\\)*?\\(\"\\)"
      (3 "\"") (5 "\""))