File tree 5 files changed +14
-0
lines changed
5 files changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -8,12 +8,14 @@ Core Grammars:
8
8
9
9
- enh(csp) add missing directives / keywords from MDN (7 more) [ Max Liashuk] [ ]
10
10
- enh(ada) add new ` parallel ` keyword, allow ` [] ` for Ada 2022 [ Max Reznik] [ ]
11
+ - fix(ex) adds support for ` ?' ` char literal and missing ` defguardp ` keyword [ Kevin Bloch] [ ]
11
12
12
13
CONTRIBUTORS
13
14
14
15
[ Josh Marchand ] : https://github.com/yHSJ
15
16
[ Max Liashuk ] : https://github.com/probil
16
17
[ Max Reznik ] : https://github.com/reznikmm
18
+ [ Kevin Bloch ] : https://github.com/codingthat
17
19
18
20
## Version 11.11.1
19
21
Original file line number Diff line number Diff line change @@ -20,6 +20,7 @@ export default function(hljs) {
20
20
"cond" ,
21
21
"defstruct" ,
22
22
"defguard" ,
23
+ "defguardp" ,
23
24
"do" ,
24
25
"else" ,
25
26
"end" ,
@@ -228,7 +229,13 @@ export default function(hljs) {
228
229
beginKeywords : 'defimpl defmodule defprotocol defrecord' ,
229
230
end : / \b d o \b | $ | ; /
230
231
} ) ;
232
+ const CHAR_LITERAL = {
233
+ className : 'string' ,
234
+ begin : / \? ' / ,
235
+ relevance : 0
236
+ } ;
231
237
const ELIXIR_DEFAULT_CONTAINS = [
238
+ CHAR_LITERAL ,
232
239
STRING ,
233
240
REGEX_SIGIL ,
234
241
UPCASE_SIGIL ,
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ guy = Person.new first_name: "Guy"
10
10
guy.name
11
11
12
12
defmodule ListServer do
13
+ defguardp apostrophe?(c) when c == ?'
13
14
@moduledoc """
14
15
This module provides an easy to use ListServer, useful for keeping
15
16
lists of things.
Original file line number Diff line number Diff line change
1
+ <span class="hljs-keyword">defguardp</span> apostrophe?(c) <span class="hljs-keyword">when</span> c == <span class="hljs-string">?'</span>
2
+ <span class="hljs-keyword">defguardp</span> upper?(c) <span class="hljs-keyword">when</span> (c >= ?A <span class="hljs-keyword">and</span> c <= ?Z)
Original file line number Diff line number Diff line change
1
+ defguardp apostrophe?(c) when c == ?'
2
+ defguardp upper?(c) when (c >= ?A and c <= ?Z)
You can’t perform that action at this time.
0 commit comments