;; electric-boogaloo-mode.el --- a simple major mode for editing Electric Boogaloo files.

;; Version: 20160505.0000
;; Author: Getty Ritter
;; Url: http://github.com/aisamanra/electric-boogaloo-mode

(defvar electric-boogaloo-font-lock nil
  "electric-boogaloo font lock table")
(setq electric-boogaloo-font-lock
      '(( "\\(--.*\\)"
          . font-lock-comment-face )
        ( "^\\([A-Za-z0-9_]+\\)"
          . font-lock-function-name-face )
        ( "^  +\\([A-Za-z0-9_]+\\)"
          1 font-lock-variable-name-face )
        ( "\\(int\\|integer\\|null\\|real\\|text\\|blob\\|date\\)"
          . font-lock-builtin-face )))

(defvar electric-boogaloo-syntax-table nil
  "Syntax table for `electric-boogaloo-mode'.")
(setq electric-boogaloo-syntax-table (make-syntax-table))

(define-derived-mode electric-boogaloo-mode prog-mode
  "electric-boogaloo-mode is a major mode for editing .eb files"
  :syntax-table ndbl-syntax-table

  (setq font-lock-defaults '(electric-boogaloo-font-lock))
  (setq mode-name "Electric Boogaloo mode")
  (setq comment-start "--")
  (setq comment-end ""))

;;;###autoload
(add-to-list 'auto-mode-alist '("\\.eb\\'" . electric-boogaloo-mode))

(provide 'electric-boogaloo-mode)

;;; electric-boogaloo-mode.el ends here
