fix header, fix comments maybe?
This commit is contained in:
parent
0ed18154f2
commit
b512575cf7
35
zre-mode.el
35
zre-mode.el
|
@ -1,12 +1,26 @@
|
|||
;;; zre-mode.el --- Major mode for editing Zre code -*- lexical-binding: t; -*-
|
||||
;;
|
||||
;; Licensed under the GPLv3 License.
|
||||
;; Copyright (C) 2025 zongor
|
||||
;;
|
||||
;; 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 <https://www.gnu.org/licenses/>.
|
||||
;;;
|
||||
|
||||
(defvar zre-keywords
|
||||
'("fn" "to" "in" "is" "as" "use" "if" "else"
|
||||
"for" "try" "catch" "while" "do" "exit"
|
||||
"return" "const" "type" "this" "yield"
|
||||
"break" "mod" "not" "and" "or" "print" "let")
|
||||
'("fn" "to" "in" "is" "as" "use" "if" "else" "default"
|
||||
"for" "try" "catch" "while" "do" "exit" "switch"
|
||||
"return" "const" "type" "this" "yield" "case"
|
||||
"assert" "break" "mod" "not" "and" "or" "print" "let"
|
||||
"band" "bor" "bxor" "srl" "sll")
|
||||
"Keywords in Zre.")
|
||||
|
||||
(defvar zre-types
|
||||
|
@ -53,16 +67,13 @@
|
|||
("`[^`]*`" . font-lock-string-face))
|
||||
|
||||
"Font lock keywords for Zre mode.")
|
||||
|
||||
(defvar zre-mode-syntax-table
|
||||
(let ((st (make-syntax-table)))
|
||||
;; C++-style comments
|
||||
(modify-syntax-entry ?/ ". 14b" st)
|
||||
;; C-style comments
|
||||
(modify-syntax-entry ?/ ". 124" st)
|
||||
(modify-syntax-entry ?* ". 23" st)
|
||||
;; Strings
|
||||
(modify-syntax-entry ?\" "\"" st)
|
||||
(modify-syntax-entry ?` "\"" st)
|
||||
st)
|
||||
(modify-syntax-entry ?` "\"" st))
|
||||
"Syntax table for Zre mode.")
|
||||
|
||||
(define-derived-mode zre-mode prog-mode "Zre"
|
||||
|
|
Loading…
Reference in New Issue