Skip to content

Commit

Permalink
Merge pull request #244 from edmz/true_false_nil
Browse files Browse the repository at this point in the history
True,false, nil are highlighted as atoms
  • Loading branch information
mattdeboard committed Sep 3, 2015
2 parents 60aeb48 + 83cd1f1 commit f899bc7
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 3 deletions.
2 changes: 1 addition & 1 deletion elixir-mode.el
Original file line number Diff line number Diff line change
Expand Up @@ -367,7 +367,7 @@ is used to limit the scan."
1 font-lock-type-face)

;; Atoms and singleton-like words like true/false/nil.
(,(elixir-rx (group atoms)
(,(elixir-rx (group (or atoms "true" "false" "nil"))
(zero-or-more space)
(optional "="))
1 elixir-atom-face)
Expand Down
11 changes: 9 additions & 2 deletions test/elixir-mode-font-test.el
Original file line number Diff line number Diff line change
Expand Up @@ -169,14 +169,21 @@ end"
":oriole
:andale
:ms2pid
:CapitalizedAtom"
:CapitalizedAtom
true
false
nil
"
(should (eq (elixir-test-face-at 3) 'elixir-atom-face))
(should (eq (elixir-test-face-at 5) 'elixir-atom-face))
(should (eq (elixir-test-face-at 10) 'elixir-atom-face))
(should (eq (elixir-test-face-at 13) 'elixir-atom-face))
(should (eq (elixir-test-face-at 18) 'elixir-atom-face))
(should (eq (elixir-test-face-at 23) 'elixir-atom-face))
(should (eq (elixir-test-face-at 26) 'elixir-atom-face))))
(should (eq (elixir-test-face-at 26) 'elixir-atom-face))
(should (eq (elixir-test-face-at 43) 'elixir-atom-face))
(should (eq (elixir-test-face-at 48) 'elixir-atom-face))
(should (eq (elixir-test-face-at 54) 'elixir-atom-face))))

(ert-deftest elixir-mode-syntax-table/fontify-map-keys ()
:tags '(fontification map syntax-table)
Expand Down

0 comments on commit f899bc7

Please sign in to comment.