Skip to content

Commit

Permalink
local copy of builtin-whitespace, adds \r char
Browse files Browse the repository at this point in the history
  • Loading branch information
msimerson committed Mar 17, 2022
1 parent ab37c69 commit ebc5232
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/bind-grammar.ne
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@

#@builtin "number.ne"
@builtin "string.ne"
@builtin "whitespace.ne"


main -> (statement eol):+

Expand Down Expand Up @@ -105,6 +102,11 @@ IPv6v4_comp -> (IPv6_hex times_3[":" IPv6_hex]):? "::"
ip4
{% (d) => flat_string(d) %}

# Whitespace: `_` is optional, `__` is mandatory.
_ -> wschar:* {% function(d) {return null;} %}
__ -> wschar:+ {% function(d) {return null;} %}

wschar -> [ \t\n\r\v\f] {% id %}

#ALPHA_NUM -> [0-9A-Za-z]
#ALPHA_NUM_U -> [0-9A-Za-z\u0080-\uFFFF] {% id %}
Expand Down

0 comments on commit ebc5232

Please sign in to comment.