rouge 0.4.0 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/Gemfile +2 -0
- data/bin/rougify +1 -1
- data/lib/rouge/demos/{text → plaintext} +0 -0
- data/lib/rouge/formatters/html.rb +13 -8
- data/lib/rouge/formatters/terminal256.rb +15 -11
- data/lib/rouge/lexer.rb +3 -1
- data/lib/rouge/lexers/c.rb +65 -55
- data/lib/rouge/lexers/clojure.rb +19 -19
- data/lib/rouge/lexers/coffeescript.rb +42 -42
- data/lib/rouge/lexers/common_lisp.rb +49 -48
- data/lib/rouge/lexers/conf.rb +6 -6
- data/lib/rouge/lexers/cpp.rb +48 -48
- data/lib/rouge/lexers/csharp.rb +25 -25
- data/lib/rouge/lexers/css.rb +32 -33
- data/lib/rouge/lexers/diff.rb +8 -8
- data/lib/rouge/lexers/elixir.rb +30 -30
- data/lib/rouge/lexers/erb.rb +5 -5
- data/lib/rouge/lexers/erlang.rb +38 -38
- data/lib/rouge/lexers/factor.rb +56 -56
- data/lib/rouge/lexers/gherkin.rb +27 -27
- data/lib/rouge/lexers/go.rb +21 -21
- data/lib/rouge/lexers/groovy.rb +32 -32
- data/lib/rouge/lexers/haml.rb +35 -35
- data/lib/rouge/lexers/handlebars.rb +27 -27
- data/lib/rouge/lexers/haskell.rb +78 -79
- data/lib/rouge/lexers/html.rb +28 -28
- data/lib/rouge/lexers/http.rb +13 -13
- data/lib/rouge/lexers/ini.rb +13 -13
- data/lib/rouge/lexers/io.rb +19 -19
- data/lib/rouge/lexers/java.rb +29 -29
- data/lib/rouge/lexers/javascript.rb +49 -52
- data/lib/rouge/lexers/literate_haskell.rb +5 -5
- data/lib/rouge/lexers/llvm.rb +14 -14
- data/lib/rouge/lexers/lua.rb +33 -33
- data/lib/rouge/lexers/make.rb +26 -26
- data/lib/rouge/lexers/markdown.rb +49 -49
- data/lib/rouge/lexers/nginx.rb +19 -19
- data/lib/rouge/lexers/perl.rb +53 -54
- data/lib/rouge/lexers/php.rb +42 -43
- data/lib/rouge/lexers/{text.rb → plain_text.rb} +3 -2
- data/lib/rouge/lexers/prolog.rb +19 -19
- data/lib/rouge/lexers/puppet.rb +40 -40
- data/lib/rouge/lexers/python.rb +63 -63
- data/lib/rouge/lexers/r.rb +15 -15
- data/lib/rouge/lexers/racket.rb +29 -29
- data/lib/rouge/lexers/ruby.rb +94 -97
- data/lib/rouge/lexers/rust.rb +37 -37
- data/lib/rouge/lexers/sass.rb +15 -15
- data/lib/rouge/lexers/sass/common.rb +144 -136
- data/lib/rouge/lexers/scheme.rb +25 -25
- data/lib/rouge/lexers/scss.rb +7 -7
- data/lib/rouge/lexers/sed.rb +39 -39
- data/lib/rouge/lexers/shell.rb +45 -45
- data/lib/rouge/lexers/smalltalk.rb +36 -36
- data/lib/rouge/lexers/sql.rb +27 -27
- data/lib/rouge/lexers/tcl.rb +34 -34
- data/lib/rouge/lexers/tex.rb +24 -24
- data/lib/rouge/lexers/toml.rb +18 -18
- data/lib/rouge/lexers/viml.rb +19 -19
- data/lib/rouge/lexers/xml.rb +16 -16
- data/lib/rouge/lexers/yaml.rb +78 -81
- data/lib/rouge/plugins/redcarpet.rb +1 -1
- data/lib/rouge/regex_lexer.rb +31 -14
- data/lib/rouge/template_lexer.rb +1 -1
- data/lib/rouge/theme.rb +12 -10
- data/lib/rouge/themes/thankful_eyes.rb +43 -43
- data/lib/rouge/token.rb +145 -148
- data/lib/rouge/version.rb +1 -1
- metadata +4 -4
data/lib/rouge/lexers/haskell.rb
CHANGED
@@ -23,160 +23,159 @@ module Rouge
|
|
23
23
|
)
|
24
24
|
|
25
25
|
state :basic do
|
26
|
-
rule /\s+/m,
|
27
|
-
rule /{-#/,
|
28
|
-
rule /{-/,
|
29
|
-
rule /^--\s+\|.*?$/,
|
26
|
+
rule /\s+/m, Text
|
27
|
+
rule /{-#/, Comment::Preproc, :comment_preproc
|
28
|
+
rule /{-/, Comment::Multiline, :comment
|
29
|
+
rule /^--\s+\|.*?$/, Comment::Doc
|
30
30
|
# this is complicated in order to support custom symbols
|
31
31
|
# like -->
|
32
|
-
rule /--(?![!#\$\%&*+.\/<=>?@\^\|_~]).*?$/,
|
32
|
+
rule /--(?![!#\$\%&*+.\/<=>?@\^\|_~]).*?$/, Comment::Single
|
33
33
|
end
|
34
34
|
|
35
35
|
# nested commenting
|
36
36
|
state :comment do
|
37
|
-
rule /-}/,
|
38
|
-
rule /{-/,
|
39
|
-
rule /[^-{}]+/,
|
40
|
-
rule /[-{}]/,
|
37
|
+
rule /-}/, Comment::Multiline, :pop!
|
38
|
+
rule /{-/, Comment::Multiline, :comment
|
39
|
+
rule /[^-{}]+/, Comment::Multiline
|
40
|
+
rule /[-{}]/, Comment::Multiline
|
41
41
|
end
|
42
42
|
|
43
43
|
state :comment_preproc do
|
44
|
-
rule /-}/,
|
45
|
-
rule /{-/,
|
46
|
-
rule /[^-{}]+/,
|
47
|
-
rule /[-{}]/,
|
44
|
+
rule /-}/, Comment::Preproc, :pop!
|
45
|
+
rule /{-/, Comment::Preproc, :comment
|
46
|
+
rule /[^-{}]+/, Comment::Preproc
|
47
|
+
rule /[-{}]/, Comment::Preproc
|
48
48
|
end
|
49
49
|
|
50
50
|
state :root do
|
51
51
|
mixin :basic
|
52
52
|
|
53
|
-
rule /\bimport\b/,
|
54
|
-
rule /\bmodule\b/,
|
55
|
-
rule /\berror\b/,
|
56
|
-
rule /\b(?:#{reserved.join('|')})\b/,
|
53
|
+
rule /\bimport\b/, Keyword::Reserved, :import
|
54
|
+
rule /\bmodule\b/, Keyword::Reserved, :module
|
55
|
+
rule /\berror\b/, Name::Exception
|
56
|
+
rule /\b(?:#{reserved.join('|')})\b/, Keyword::Reserved
|
57
57
|
# not sure why, but ^ doesn't work here
|
58
|
-
# rule /^[_a-z][\w']*/,
|
59
|
-
rule /[_a-z][\w']*/,
|
60
|
-
rule /[A-Z][\w']*/,
|
58
|
+
# rule /^[_a-z][\w']*/, Name::Function
|
59
|
+
rule /[_a-z][\w']*/, Name
|
60
|
+
rule /[A-Z][\w']*/, Keyword::Type
|
61
61
|
|
62
62
|
# lambda operator
|
63
|
-
rule %r(\\(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)),
|
63
|
+
rule %r(\\(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)), Name::Function
|
64
64
|
# special operators
|
65
|
-
rule %r((<-|::|->|=>|=)(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)),
|
65
|
+
rule %r((<-|::|->|=>|=)(?![:!#\$\%&*+.\\/<=>?@^\|~-]+)), Operator
|
66
66
|
# constructor/type operators
|
67
|
-
rule %r(:[:!#\$\%&*+.\\/<=>?@^\|~-]*),
|
67
|
+
rule %r(:[:!#\$\%&*+.\\/<=>?@^\|~-]*), Operator
|
68
68
|
# other operators
|
69
|
-
rule %r([:!#\$\%&*+.\\/<=>?@^\|~-]+),
|
69
|
+
rule %r([:!#\$\%&*+.\\/<=>?@^\|~-]+), Operator
|
70
70
|
|
71
|
-
rule /\d+e[+-]?\d+/i,
|
72
|
-
rule /\d+\.\d+(e[+-]?\d+)?/i,
|
73
|
-
rule /0o[0-7]+/i,
|
74
|
-
rule /0x[\da-f]+/i,
|
75
|
-
rule /\d+/,
|
71
|
+
rule /\d+e[+-]?\d+/i, Num::Float
|
72
|
+
rule /\d+\.\d+(e[+-]?\d+)?/i, Num::Float
|
73
|
+
rule /0o[0-7]+/i, Num::Oct
|
74
|
+
rule /0x[\da-f]+/i, Num::Hex
|
75
|
+
rule /\d+/, Num::Integer
|
76
76
|
|
77
|
-
rule /'/,
|
78
|
-
rule /"/,
|
77
|
+
rule /'/, Str::Char, :character
|
78
|
+
rule /"/, Str, :string
|
79
79
|
|
80
|
-
rule /\[\s*\]/,
|
81
|
-
rule /\(\s*\)/,
|
82
|
-
rule /[\[\](),;`{}]/,
|
80
|
+
rule /\[\s*\]/, Keyword::Type
|
81
|
+
rule /\(\s*\)/, Name::Builtin
|
82
|
+
rule /[\[\](),;`{}]/, Punctuation
|
83
83
|
end
|
84
84
|
|
85
85
|
state :import do
|
86
|
-
rule /\s+/,
|
87
|
-
rule /"/,
|
88
|
-
rule /\bqualified\b/,
|
86
|
+
rule /\s+/, Text
|
87
|
+
rule /"/, Str, :string
|
88
|
+
rule /\bqualified\b/, Keyword
|
89
89
|
# import X as Y
|
90
90
|
rule /([A-Z][\w.]*)(\s+)(as)(\s+)([A-Z][a-zA-Z0-9_.]*)/ do
|
91
|
-
group
|
92
|
-
group
|
93
|
-
group
|
94
|
-
group
|
95
|
-
group
|
91
|
+
group Name::Namespace # X
|
92
|
+
group Text
|
93
|
+
group Keyword # as
|
94
|
+
group Text
|
95
|
+
group Name # Y
|
96
96
|
pop!
|
97
97
|
end
|
98
98
|
|
99
99
|
# import X hiding (functions)
|
100
100
|
rule /([A-Z][\w.]*)(\s+)(hiding)(\s+)(\()/ do
|
101
|
-
group
|
102
|
-
group
|
103
|
-
group
|
104
|
-
group
|
105
|
-
group
|
101
|
+
group Name::Namespace # X
|
102
|
+
group Text
|
103
|
+
group Keyword # hiding
|
104
|
+
group Text
|
105
|
+
group Punctuation # (
|
106
106
|
pop!
|
107
107
|
push :funclist
|
108
108
|
end
|
109
109
|
|
110
110
|
# import X (functions)
|
111
111
|
rule /([A-Z][\w.]*)(\s+)(\()/ do
|
112
|
-
group
|
113
|
-
group
|
114
|
-
group
|
112
|
+
group Name::Namespace # X
|
113
|
+
group Text
|
114
|
+
group Punctuation # (
|
115
115
|
pop!
|
116
116
|
push :funclist
|
117
117
|
end
|
118
118
|
|
119
|
-
rule /[\w.]+/,
|
119
|
+
rule /[\w.]+/, Name::Namespace, :pop!
|
120
120
|
end
|
121
121
|
|
122
122
|
state :module do
|
123
|
-
rule /\s+/,
|
123
|
+
rule /\s+/, Text
|
124
124
|
# module Foo (functions)
|
125
125
|
rule /([A-Z][\w.]*)(\s+)(\()/ do
|
126
|
-
group
|
127
|
-
group
|
128
|
-
group
|
126
|
+
group Name::Namespace
|
127
|
+
group Text
|
128
|
+
group Punctuation
|
129
129
|
push :funclist
|
130
130
|
end
|
131
131
|
|
132
|
-
rule /\bwhere\b/,
|
132
|
+
rule /\bwhere\b/, Keyword::Reserved, :pop!
|
133
133
|
|
134
|
-
rule /[A-Z][a-zA-Z0-9_.]*/,
|
134
|
+
rule /[A-Z][a-zA-Z0-9_.]*/, Name::Namespace, :pop!
|
135
135
|
end
|
136
136
|
|
137
137
|
state :funclist do
|
138
138
|
mixin :basic
|
139
|
-
rule /[A-Z]\w*/,
|
140
|
-
rule /(_[\w\']+|[a-z][\w\']*)/,
|
141
|
-
rule /,/,
|
142
|
-
rule /[:!#\$\%&*+.\\\/<=>?@^\|~-]+/,
|
143
|
-
rule /\(/,
|
144
|
-
rule /\)/,
|
139
|
+
rule /[A-Z]\w*/, Keyword::Type
|
140
|
+
rule /(_[\w\']+|[a-z][\w\']*)/, Name::Function
|
141
|
+
rule /,/, Punctuation
|
142
|
+
rule /[:!#\$\%&*+.\\\/<=>?@^\|~-]+/, Operator
|
143
|
+
rule /\(/, Punctuation, :funclist
|
144
|
+
rule /\)/, Punctuation, :pop!
|
145
145
|
end
|
146
146
|
|
147
147
|
state :character do
|
148
148
|
rule /\\/ do
|
149
|
-
token
|
149
|
+
token Str::Escape
|
150
150
|
push :character_end
|
151
151
|
push :escape
|
152
152
|
end
|
153
153
|
|
154
154
|
rule /./ do
|
155
|
-
token
|
156
|
-
|
157
|
-
push :character_end
|
155
|
+
token Str::Char
|
156
|
+
goto :character_end
|
158
157
|
end
|
159
158
|
end
|
160
159
|
|
161
160
|
state :character_end do
|
162
|
-
rule /'/,
|
163
|
-
rule /./,
|
161
|
+
rule /'/, Str::Char, :pop!
|
162
|
+
rule /./, Error, :pop!
|
164
163
|
end
|
165
164
|
|
166
165
|
state :string do
|
167
|
-
rule /"/,
|
168
|
-
rule /\\/,
|
169
|
-
rule /[^\\"]+/,
|
166
|
+
rule /"/, Str, :pop!
|
167
|
+
rule /\\/, Str::Escape, :escape
|
168
|
+
rule /[^\\"]+/, Str
|
170
169
|
end
|
171
170
|
|
172
171
|
state :escape do
|
173
|
-
rule /[abfnrtv"'&\\]/,
|
174
|
-
rule /\^[\]\[A-Z@\^_]/,
|
175
|
-
rule /#{ascii.join('|')}/,
|
176
|
-
rule /o[0-7]+/i,
|
177
|
-
rule /x[\da-f]/i,
|
178
|
-
rule /\d+/,
|
179
|
-
rule /\s+\\/,
|
172
|
+
rule /[abfnrtv"'&\\]/, Str::Escape, :pop!
|
173
|
+
rule /\^[\]\[A-Z@\^_]/, Str::Escape, :pop!
|
174
|
+
rule /#{ascii.join('|')}/, Str::Escape, :pop!
|
175
|
+
rule /o[0-7]+/i, Str::Escape, :pop!
|
176
|
+
rule /x[\da-f]/i, Str::Escape, :pop!
|
177
|
+
rule /\d+/, Str::Escape, :pop!
|
178
|
+
rule /\s+\\/, Str::Escape, :pop!
|
180
179
|
end
|
181
180
|
end
|
182
181
|
end
|
data/lib/rouge/lexers/html.rb
CHANGED
@@ -12,76 +12,76 @@ module Rouge
|
|
12
12
|
end
|
13
13
|
|
14
14
|
state :root do
|
15
|
-
rule /[^<&]+/m,
|
16
|
-
rule /&\S*?;/,
|
17
|
-
rule /<!DOCTYPE .*?>/i,
|
18
|
-
rule /<!\[CDATA\[.*?\]\]>/m,
|
19
|
-
rule /<!--/,
|
20
|
-
rule /<\?.*?\?>/m,
|
15
|
+
rule /[^<&]+/m, Text
|
16
|
+
rule /&\S*?;/, Name::Entity
|
17
|
+
rule /<!DOCTYPE .*?>/i, Comment::Preproc
|
18
|
+
rule /<!\[CDATA\[.*?\]\]>/m, Comment::Preproc
|
19
|
+
rule /<!--/, Comment, :comment
|
20
|
+
rule /<\?.*?\?>/m, Comment::Preproc # php? really?
|
21
21
|
|
22
22
|
rule /<\s*script\s*/m do
|
23
|
-
token
|
23
|
+
token Name::Tag
|
24
24
|
push :script_content
|
25
25
|
push :tag
|
26
26
|
end
|
27
27
|
|
28
28
|
rule /<\s*style\s*/m do
|
29
|
-
token
|
29
|
+
token Name::Tag
|
30
30
|
push :style_content
|
31
31
|
push :tag
|
32
32
|
end
|
33
33
|
|
34
|
-
rule %r(<\s*[a-zA-Z0-9:]+),
|
35
|
-
rule %r(<\s*/\s*[a-zA-Z0-9:]+\s*>),
|
34
|
+
rule %r(<\s*[a-zA-Z0-9:]+), Name::Tag, :tag # opening tags
|
35
|
+
rule %r(<\s*/\s*[a-zA-Z0-9:]+\s*>), Name::Tag # closing tags
|
36
36
|
end
|
37
37
|
|
38
38
|
state :comment do
|
39
|
-
rule /[^-]+/,
|
40
|
-
rule /-->/,
|
41
|
-
rule /-/,
|
39
|
+
rule /[^-]+/, Comment
|
40
|
+
rule /-->/, Comment, :pop!
|
41
|
+
rule /-/, Comment
|
42
42
|
end
|
43
43
|
|
44
44
|
state :tag do
|
45
|
-
rule /\s+/m,
|
46
|
-
rule /[a-zA-Z0-9_:-]+\s*=/m,
|
47
|
-
rule /[a-zA-Z0-9_:-]+/,
|
48
|
-
rule %r(/?\s*>)m,
|
45
|
+
rule /\s+/m, Text
|
46
|
+
rule /[a-zA-Z0-9_:-]+\s*=/m, Name::Attribute, :attr
|
47
|
+
rule /[a-zA-Z0-9_:-]+/, Name::Attribute
|
48
|
+
rule %r(/?\s*>)m, Name::Tag, :pop!
|
49
49
|
end
|
50
50
|
|
51
51
|
state :attr do
|
52
52
|
# TODO: are backslash escapes valid here?
|
53
53
|
rule /"/ do
|
54
|
-
token
|
55
|
-
|
54
|
+
token Str
|
55
|
+
goto :dq
|
56
56
|
end
|
57
57
|
|
58
58
|
rule /'/ do
|
59
|
-
token
|
60
|
-
|
59
|
+
token Str
|
60
|
+
goto :sq
|
61
61
|
end
|
62
62
|
|
63
|
-
rule /[^\s>]+/,
|
63
|
+
rule /[^\s>]+/, Str, :pop!
|
64
64
|
end
|
65
65
|
|
66
66
|
state :dq do
|
67
|
-
rule /"/,
|
68
|
-
rule /[^"]+/,
|
67
|
+
rule /"/, Str, :pop!
|
68
|
+
rule /[^"]+/, Str
|
69
69
|
end
|
70
70
|
|
71
71
|
state :sq do
|
72
|
-
rule /'/,
|
73
|
-
rule /[^']+/,
|
72
|
+
rule /'/, Str, :pop!
|
73
|
+
rule /[^']+/, Str
|
74
74
|
end
|
75
75
|
|
76
76
|
state :script_content do
|
77
|
-
rule %r(<\s*/\s*script\s*>)m,
|
77
|
+
rule %r(<\s*/\s*script\s*>)m, Name::Tag, :pop!
|
78
78
|
rule %r(.*?(?=<\s*/\s*script\s*>))m do
|
79
79
|
delegate Javascript
|
80
80
|
end
|
81
81
|
end
|
82
82
|
|
83
83
|
state :style_content do
|
84
|
-
rule %r(<\s*/\s*style\s*>)m,
|
84
|
+
rule %r(<\s*/\s*style\s*>)m, Name::Tag, :pop!
|
85
85
|
rule %r(.*(?=<\s*/\s*style\s*>))m do
|
86
86
|
delegate CSS
|
87
87
|
end
|
data/lib/rouge/lexers/http.rb
CHANGED
@@ -17,10 +17,10 @@ module Rouge
|
|
17
17
|
([^ ]+)([ ]+) # path
|
18
18
|
(HTTPS?)(/)(1[.][01])(\r?\n|$) # http version
|
19
19
|
)ox do
|
20
|
-
group
|
21
|
-
group
|
22
|
-
group
|
23
|
-
group
|
20
|
+
group Name::Function; group Text
|
21
|
+
group Name::Namespace; group Text
|
22
|
+
group Keyword; group Operator
|
23
|
+
group Num; group Text
|
24
24
|
push :headers
|
25
25
|
end
|
26
26
|
|
@@ -30,10 +30,10 @@ module Rouge
|
|
30
30
|
(\d{3})([ ]+) # status
|
31
31
|
([^\r\n]+)(\r?\n|$) # status message
|
32
32
|
)x do
|
33
|
-
group
|
34
|
-
group
|
35
|
-
group
|
36
|
-
group
|
33
|
+
group Keyword; group Operator
|
34
|
+
group Num; group Text
|
35
|
+
group Num; group Text
|
36
|
+
group Name::Exception; group Text
|
37
37
|
push :headers
|
38
38
|
end
|
39
39
|
end
|
@@ -46,16 +46,16 @@ module Rouge
|
|
46
46
|
@content_type = value.split(';')[0].downcase
|
47
47
|
end
|
48
48
|
|
49
|
-
group
|
50
|
-
group
|
51
|
-
group
|
49
|
+
group Name::Attribute; group Text
|
50
|
+
group Punctuation; group Text
|
51
|
+
group Str; group Text
|
52
52
|
end
|
53
53
|
|
54
54
|
rule /([^\r\n]+)(\r?\n|$)/ do
|
55
|
-
group
|
55
|
+
group Str; group Text
|
56
56
|
end
|
57
57
|
|
58
|
-
rule /\r?\n/,
|
58
|
+
rule /\r?\n/, Text, :content
|
59
59
|
end
|
60
60
|
|
61
61
|
state :content do
|
data/lib/rouge/lexers/ini.rb
CHANGED
@@ -15,40 +15,40 @@ module Rouge
|
|
15
15
|
identifier = /[\w.]+/
|
16
16
|
|
17
17
|
state :basic do
|
18
|
-
rule /[;#].*?\n/,
|
19
|
-
rule /\s+/,
|
20
|
-
rule /\\\n/,
|
18
|
+
rule /[;#].*?\n/, Comment
|
19
|
+
rule /\s+/, Text
|
20
|
+
rule /\\\n/, Str::Escape
|
21
21
|
end
|
22
22
|
|
23
23
|
state :root do
|
24
24
|
mixin :basic
|
25
25
|
|
26
26
|
rule /(#{identifier})(\s*)(=)/ do
|
27
|
-
group
|
28
|
-
group
|
27
|
+
group Name::Property; group Text
|
28
|
+
group Punctuation
|
29
29
|
push :value
|
30
30
|
end
|
31
31
|
|
32
|
-
rule /\[.*?\]/,
|
32
|
+
rule /\[.*?\]/, Name::Namespace
|
33
33
|
end
|
34
34
|
|
35
35
|
state :value do
|
36
|
-
rule /\n/,
|
36
|
+
rule /\n/, Text, :pop!
|
37
37
|
mixin :basic
|
38
|
-
rule /"/,
|
39
|
-
rule /'.*?'/,
|
38
|
+
rule /"/, Str, :dq
|
39
|
+
rule /'.*?'/, Str
|
40
40
|
mixin :esc_str
|
41
|
-
rule /[^\\\n]+/,
|
41
|
+
rule /[^\\\n]+/, Str
|
42
42
|
end
|
43
43
|
|
44
44
|
state :dq do
|
45
|
-
rule /"/,
|
45
|
+
rule /"/, Str, :pop!
|
46
46
|
mixin :esc_str
|
47
|
-
rule /[^\\"]+/m,
|
47
|
+
rule /[^\\"]+/m, Str
|
48
48
|
end
|
49
49
|
|
50
50
|
state :esc_str do
|
51
|
-
rule /\\./m,
|
51
|
+
rule /\\./m, Str::Escape
|
52
52
|
end
|
53
53
|
end
|
54
54
|
end
|