Skip to content

Commit 64dfa35

Browse files
committed
Shorten "hexchar" to "hex"
1 parent 5605250 commit 64dfa35

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

selector-grammar.ne

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -133,7 +133,7 @@ ident -> "-":? nmstart nmchar:*
133133
name -> nmchar:+
134134
nmstart -> [_a-zA-Z] | nonascii | escape
135135
nonascii -> [^\0-\177]
136-
unicode -> "\\" ( hexchar hexchar:? hexchar:? hexchar:? hexchar:? hexchar:? ) ( "\r\n" | space ):?
136+
unicode -> "\\" ( hex hex:? hex:? hex:? hex:? hex:? ) ( "\r\n" | space ):?
137137
{% (d) => { return {parsed: String.fromCodePoint(parseInt(collapse(d[1]), 16)), raw: collapse(d)} } %}
138138
escape -> unicode
139139
| "\\" [^\n\r\f0-9a-fA-F] {% (d) => { return {parsed: d[1], raw: collapseRaw(d)} } %}
@@ -145,7 +145,7 @@ int -> [0-9]:+
145145
# @see: https://www.w3.org/TR/css3-selectors/#nth-child-pseudo
146146
nth -> ( [+-]:? int:? [nN] ( _ [+-] _ int ):? | [+-]:? int )
147147
{% (d) => { return {parsed: collapse(d).replace(/[ \n\r\t\f]+/g, ''), raw: collapseRaw(d)} } %}
148-
hexchar -> [0-9a-fA-F]
148+
hex -> [0-9a-fA-F]
149149
string -> ( string1 | string2 ) {% (d) => d[0][0] %}
150150
string1 -> "\"" ( [^\n\r\f\\"] | escaped_nl | nonascii | escape ):* "\""
151151
{% (d) => { return {parsed: collapse(d[1]), raw: collapseRaw(d)} } %}

0 commit comments

Comments
 (0)