File tree Expand file tree Collapse file tree
lib/interscript/isc/grammar/concerns Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -14,6 +14,7 @@ module Items
1414 quoted_string |
1515 str ( "none" ) . as ( :none ) |
1616 zero_width_primitive |
17+ any_character |
1718 any_constructor |
1819 capture_constructor |
1920 maybe_constructor |
@@ -48,6 +49,11 @@ module Items
4849 ) . as ( :primitive )
4950 end
5051
52+ # any_character — matches any single character.
53+ rule ( :any_character ) do
54+ str ( "any_character" ) . as ( :any_char )
55+ end
56+
5157 rule ( :any_constructor ) do
5258 str ( "any" ) >> str ( "(" ) >> whitespace? >>
5359 ( range_arg | set_arg | alias_arg ) . as ( :any ) >>
@@ -114,7 +120,8 @@ module Items
114120 str ( "none" ) | str ( "boundary" ) | str ( "line_start" ) |
115121 str ( "line_end" ) | str ( "word_boundary" ) |
116122 str ( "downcase" ) | str ( "upcase" ) | str ( "title_case" ) |
117- str ( "capture" ) | str ( "maybe" ) | str ( "some" ) | str ( "ref" )
123+ str ( "capture" ) | str ( "maybe" ) | str ( "some" ) | str ( "ref" ) |
124+ str ( "any_character" )
118125 end
119126
120127 # Concatenation: one or more atoms. The continuation pattern
Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ module Stages
6262 end
6363
6464 rule ( :rule_line ) do
65- whitespace? >> rule >> whitespace?
65+ whitespace? >> ( rule | comment_item ) >> whitespace?
6666 end
6767
6868 # A rule is either compact form (single line) or block form
You can’t perform that action at this time.
0 commit comments