rouge 0.4.0 → 0.5.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (69) hide show
  1. data/Gemfile +2 -0
  2. data/bin/rougify +1 -1
  3. data/lib/rouge/demos/{text → plaintext} +0 -0
  4. data/lib/rouge/formatters/html.rb +13 -8
  5. data/lib/rouge/formatters/terminal256.rb +15 -11
  6. data/lib/rouge/lexer.rb +3 -1
  7. data/lib/rouge/lexers/c.rb +65 -55
  8. data/lib/rouge/lexers/clojure.rb +19 -19
  9. data/lib/rouge/lexers/coffeescript.rb +42 -42
  10. data/lib/rouge/lexers/common_lisp.rb +49 -48
  11. data/lib/rouge/lexers/conf.rb +6 -6
  12. data/lib/rouge/lexers/cpp.rb +48 -48
  13. data/lib/rouge/lexers/csharp.rb +25 -25
  14. data/lib/rouge/lexers/css.rb +32 -33
  15. data/lib/rouge/lexers/diff.rb +8 -8
  16. data/lib/rouge/lexers/elixir.rb +30 -30
  17. data/lib/rouge/lexers/erb.rb +5 -5
  18. data/lib/rouge/lexers/erlang.rb +38 -38
  19. data/lib/rouge/lexers/factor.rb +56 -56
  20. data/lib/rouge/lexers/gherkin.rb +27 -27
  21. data/lib/rouge/lexers/go.rb +21 -21
  22. data/lib/rouge/lexers/groovy.rb +32 -32
  23. data/lib/rouge/lexers/haml.rb +35 -35
  24. data/lib/rouge/lexers/handlebars.rb +27 -27
  25. data/lib/rouge/lexers/haskell.rb +78 -79
  26. data/lib/rouge/lexers/html.rb +28 -28
  27. data/lib/rouge/lexers/http.rb +13 -13
  28. data/lib/rouge/lexers/ini.rb +13 -13
  29. data/lib/rouge/lexers/io.rb +19 -19
  30. data/lib/rouge/lexers/java.rb +29 -29
  31. data/lib/rouge/lexers/javascript.rb +49 -52
  32. data/lib/rouge/lexers/literate_haskell.rb +5 -5
  33. data/lib/rouge/lexers/llvm.rb +14 -14
  34. data/lib/rouge/lexers/lua.rb +33 -33
  35. data/lib/rouge/lexers/make.rb +26 -26
  36. data/lib/rouge/lexers/markdown.rb +49 -49
  37. data/lib/rouge/lexers/nginx.rb +19 -19
  38. data/lib/rouge/lexers/perl.rb +53 -54
  39. data/lib/rouge/lexers/php.rb +42 -43
  40. data/lib/rouge/lexers/{text.rb → plain_text.rb} +3 -2
  41. data/lib/rouge/lexers/prolog.rb +19 -19
  42. data/lib/rouge/lexers/puppet.rb +40 -40
  43. data/lib/rouge/lexers/python.rb +63 -63
  44. data/lib/rouge/lexers/r.rb +15 -15
  45. data/lib/rouge/lexers/racket.rb +29 -29
  46. data/lib/rouge/lexers/ruby.rb +94 -97
  47. data/lib/rouge/lexers/rust.rb +37 -37
  48. data/lib/rouge/lexers/sass.rb +15 -15
  49. data/lib/rouge/lexers/sass/common.rb +144 -136
  50. data/lib/rouge/lexers/scheme.rb +25 -25
  51. data/lib/rouge/lexers/scss.rb +7 -7
  52. data/lib/rouge/lexers/sed.rb +39 -39
  53. data/lib/rouge/lexers/shell.rb +45 -45
  54. data/lib/rouge/lexers/smalltalk.rb +36 -36
  55. data/lib/rouge/lexers/sql.rb +27 -27
  56. data/lib/rouge/lexers/tcl.rb +34 -34
  57. data/lib/rouge/lexers/tex.rb +24 -24
  58. data/lib/rouge/lexers/toml.rb +18 -18
  59. data/lib/rouge/lexers/viml.rb +19 -19
  60. data/lib/rouge/lexers/xml.rb +16 -16
  61. data/lib/rouge/lexers/yaml.rb +78 -81
  62. data/lib/rouge/plugins/redcarpet.rb +1 -1
  63. data/lib/rouge/regex_lexer.rb +31 -14
  64. data/lib/rouge/template_lexer.rb +1 -1
  65. data/lib/rouge/theme.rb +12 -10
  66. data/lib/rouge/themes/thankful_eyes.rb +43 -43
  67. data/lib/rouge/token.rb +145 -148
  68. data/lib/rouge/version.rb +1 -1
  69. metadata +4 -4
@@ -52,9 +52,9 @@ module Rouge
52
52
 
53
53
  state :start_line do
54
54
  mixin :whitespace
55
- rule /\s+/, 'Text'
55
+ rule /\s+/, Text
56
56
  rule /#\[/ do
57
- token 'Comment.Preproc'; push :attribute
57
+ token Comment::Preproc; push :attribute
58
58
  end
59
59
  rule(//) { pop! }
60
60
  end
@@ -62,44 +62,44 @@ module Rouge
62
62
  state :attribute do
63
63
  mixin :whitespace
64
64
  mixin :has_literals
65
- rule /[(,)=]/, 'Comment.Preproc'
66
- rule /\]/, 'Comment.Preproc', :pop!
67
- rule id, 'Comment.Preproc'
65
+ rule /[(,)=]/, Comment::Preproc
66
+ rule /\]/, Comment::Preproc, :pop!
67
+ rule id, Comment::Preproc
68
68
  end
69
69
 
70
70
  state :whitespace do
71
- rule /\s+/, 'Text'
72
- rule %r(//[^\n]*), 'Comment'
73
- rule %r(/[*].*?[*]/)m, 'Comment.Multiline'
71
+ rule /\s+/, Text
72
+ rule %r(//[^\n]*), Comment
73
+ rule %r(/[*].*?[*]/)m, Comment::Multiline
74
74
  end
75
75
 
76
76
  state :root do
77
- rule /\n/, 'Text', :start_line
77
+ rule /\n/, Text, :start_line
78
78
  mixin :whitespace
79
- rule /\b(?:#{Rust.keywords.join('|')})\b/, 'Keyword'
79
+ rule /\b(?:#{Rust.keywords.join('|')})\b/, Keyword
80
80
  mixin :has_literals
81
81
 
82
- rule %r([=-]>), 'Keyword'
83
- rule %r(<->), 'Keyword'
84
- rule /[()\[\]{}|,:;]/, 'Punctuation'
85
- rule /[*!@~&+%^<>=-]/, 'Operator'
82
+ rule %r([=-]>), Keyword
83
+ rule %r(<->), Keyword
84
+ rule /[()\[\]{}|,:;]/, Punctuation
85
+ rule /[*!@~&+%^<>=-]/, Operator
86
86
 
87
- rule /([.]\s*)?#{id}(?=\s*[(])/m, 'Name.Function'
88
- rule /[.]\s*#{id}/, 'Name.Property'
87
+ rule /([.]\s*)?#{id}(?=\s*[(])/m, Name::Function
88
+ rule /[.]\s*#{id}/, Name::Property
89
89
  rule /(#{id})(::)/m do
90
- group 'Name.Namespace'; group 'Punctuation'
90
+ group Name::Namespace; group Punctuation
91
91
  end
92
92
 
93
93
  # macros
94
- rule /\bmacro_rules!/, 'Name.Decorator', :macro_rules
95
- rule /#{id}!/, 'Name.Decorator', :macro
94
+ rule /\bmacro_rules!/, Name::Decorator, :macro_rules
95
+ rule /#{id}!/, Name::Decorator, :macro
96
96
 
97
97
  rule /#{id}/ do |m|
98
98
  name = m[0]
99
99
  if self.class.builtins.include? name
100
- token 'Name.Builtin'
100
+ token Name::Builtin
101
101
  else
102
- token 'Name'
102
+ token Name
103
103
  end
104
104
  end
105
105
  end
@@ -110,40 +110,40 @@ module Rouge
110
110
  rule /[\[{(]/ do |m|
111
111
  @macro_delims[delim_map[m[0]]] += 1
112
112
  debug { " macro_delims: #{@macro_delims.inspect}" }
113
- token 'Punctuation'
113
+ token Punctuation
114
114
  end
115
115
 
116
116
  rule /[\]})]/ do |m|
117
117
  @macro_delims[m[0]] -= 1
118
118
  debug { " macro_delims: #{@macro_delims.inspect}" }
119
119
  pop! if macro_closed?
120
- token 'Punctuation'
120
+ token Punctuation
121
121
  end
122
122
 
123
123
  # same as the rule in root, but don't push another macro state
124
- rule /#{id}!/, 'Name.Decorator'
124
+ rule /#{id}!/, Name::Decorator
125
125
  mixin :root
126
126
 
127
127
  # No syntax errors in macros
128
- rule /./, 'Text'
128
+ rule /./, Text
129
129
  end
130
130
 
131
131
  state :macro_rules do
132
- rule /[$]#{id}(:#{id})?/, 'Name.Variable'
133
- rule /[$]/, 'Name.Variable'
132
+ rule /[$]#{id}(:#{id})?/, Name::Variable
133
+ rule /[$]/, Name::Variable
134
134
 
135
135
  mixin :macro
136
136
  end
137
137
 
138
138
  state :has_literals do
139
139
  # constants
140
- rule /\b(?:true|false|nil)\b/, 'Keyword.Constant'
140
+ rule /\b(?:true|false|nil)\b/, Keyword::Constant
141
141
  # characters
142
142
  rule %r(
143
143
  ' (?: #{escapes} | [^\\] ) '
144
- )x, 'Literal.String.Char'
144
+ )x, Str::Char
145
145
 
146
- rule /"/, 'Literal.String', :string
146
+ rule /"/, Str, :string
147
147
 
148
148
  # numbers
149
149
  dot = /[.][0-9_]+/
@@ -156,21 +156,21 @@ module Rouge
156
156
  |#{dot}? #{exp} #{flt}?
157
157
  |#{dot}? #{exp}? #{flt}
158
158
  )
159
- )x, 'Literal.Number.Float'
159
+ )x, Num::Float
160
160
 
161
161
  rule %r(
162
162
  ( 0b[10_]+
163
163
  | 0x[0-9a-fA-F-]+
164
164
  | [0-9]+
165
165
  ) (u#{size}?|i#{size})?
166
- )x, 'Literal.Number.Integer'
166
+ )x, Num::Integer
167
167
 
168
168
  end
169
169
 
170
170
  state :string do
171
- rule /"/, 'Literal.String', :pop!
172
- rule escapes, 'Literal.String.Escape'
173
- rule /%%/, 'Literal.String.Interpol'
171
+ rule /"/, Str, :pop!
172
+ rule escapes, Str::Escape
173
+ rule /%%/, Str::Interpol
174
174
  rule %r(
175
175
  %
176
176
  ( [0-9]+ [$] )? # Parameter
@@ -178,8 +178,8 @@ module Rouge
178
178
  ( [0-9]+ [$]? )? # Width
179
179
  ( [.] [0-9]+ )? # Precision
180
180
  [bcdfiostuxX?] # Type
181
- )x, 'Literal.String.Interpol'
182
- rule /[^%"\\]+/m, 'Literal.String'
181
+ )x, Str::Interpol
182
+ rule /[^%"\\]+/m, Str
183
183
  end
184
184
  end
185
185
  end
@@ -14,30 +14,30 @@ module Rouge
14
14
  id = /[\w-]+/
15
15
 
16
16
  state :root do
17
- rule /[ \t]*\n/, 'Text'
18
- rule(/[ \t]*/) { |m| token 'Text'; indentation(m[0]) }
17
+ rule /[ \t]*\n/, Text
18
+ rule(/[ \t]*/) { |m| token Text; indentation(m[0]) }
19
19
  end
20
20
 
21
21
  state :content do
22
22
  # block comments
23
23
  rule %r(//.*?\n) do
24
- token 'Comment.Single'
24
+ token Comment::Single
25
25
  pop!; starts_block :single_comment
26
26
  end
27
27
 
28
28
  rule %r(/[*].*?\n) do
29
- token 'Comment.Multiline'
29
+ token Comment::Multiline
30
30
  pop!; starts_block :multi_comment
31
31
  end
32
32
 
33
- rule /@import\b/, 'Keyword', :import
33
+ rule /@import\b/, Keyword, :import
34
34
 
35
35
  mixin :content_common
36
36
 
37
- rule %r(=#{id}), 'Name.Function', :value
38
- rule %r([+]#{id}), 'Name.Decorator', :value
37
+ rule %r(=#{id}), Name::Function, :value
38
+ rule %r([+]#{id}), Name::Decorator, :value
39
39
 
40
- rule /:/, 'Name.Attribute', :old_style_attr
40
+ rule /:/, Name::Attribute, :old_style_attr
41
41
 
42
42
  rule(/(?=.+?:([^a-z]|$))/) { push :attribute }
43
43
 
@@ -45,17 +45,17 @@ module Rouge
45
45
  end
46
46
 
47
47
  state :single_comment do
48
- rule /.*?\n/, 'Comment.Single', :pop!
48
+ rule /.*?\n/, Comment::Single, :pop!
49
49
  end
50
50
 
51
51
  state :multi_comment do
52
- rule /.*?\n/, 'Comment.Multiline', :pop!
52
+ rule /.*?\n/, Comment::Multiline, :pop!
53
53
  end
54
54
 
55
55
  state :import do
56
- rule /[ \t]+/, 'Text'
57
- rule /\S+/, 'Literal.String'
58
- rule /\n/, 'Text', :pop!
56
+ rule /[ \t]+/, Text
57
+ rule /\S+/, Str
58
+ rule /\n/, Text, :pop!
59
59
  end
60
60
 
61
61
  state :old_style_attr do
@@ -64,10 +64,10 @@ module Rouge
64
64
  end
65
65
 
66
66
  state :end_section do
67
- rule(/\n/) { token 'Text'; reset_stack }
67
+ rule(/\n/) { token Text; reset_stack }
68
68
  end
69
69
 
70
- instance_eval(&SASS_COMMON)
70
+ include SassCommon
71
71
  end
72
72
  end
73
73
  end
@@ -2,171 +2,179 @@ module Rouge
2
2
  module Lexers
3
3
  # shared states with SCSS
4
4
  # TODO: make this less nasty to do
5
- SASS_COMMON = proc do
6
- id = /[\w-]+/
5
+ module SassCommon
6
+ include Token::Tokens
7
7
 
8
- state :content_common do
9
- rule /@for\b/, 'Keyword', :for
10
- rule /@(debug|warn|if|while)/, 'Keyword', :value
11
- rule /(@mixin)(\s+)(#{id})/ do
12
- group 'Keyword'; group 'Text'; group 'Name.Function'
13
- push :value
14
- end
8
+ def self.included(klass)
9
+ klass.class_eval(&INCLUDED_PROC)
10
+ end
15
11
 
16
- rule /@extend\b/, 'Keyword', :selector
12
+ INCLUDED_PROC = proc do
13
+ id = /[\w-]+/
17
14
 
18
- rule /(@include)(\s+)(#{id})/ do
19
- group 'Keyword'; group 'Text'; group 'Name.Decorator'
20
- push :value
21
- end
15
+ state :content_common do
16
+ rule /@for\b/, Keyword, :for
17
+ rule /@(debug|warn|if|while)/, Keyword, :value
18
+ rule /(@mixin)(\s+)(#{id})/ do
19
+ group Keyword; group Text; group Name::Function
20
+ push :value
21
+ end
22
+
23
+ rule /@extend\b/, Keyword, :selector
22
24
 
23
- rule /@#{id}/, 'Keyword', :selector
25
+ rule /(@include)(\s+)(#{id})/ do
26
+ group Keyword; group Text; group Name::Decorator
27
+ push :value
28
+ end
29
+
30
+ rule /@#{id}/, Keyword, :selector
24
31
 
25
- # $variable: assignment
26
- rule /([$]#{id})([ \t]*)(:)/ do
27
- group 'Name.Variable'; group 'Text'; group 'Punctuation'
28
- push :value
32
+ # $variable: assignment
33
+ rule /([$]#{id})([ \t]*)(:)/ do
34
+ group Name::Variable; group Text; group Punctuation
35
+ push :value
36
+ end
29
37
  end
30
- end
31
38
 
32
- state :value do
33
- mixin :end_section
34
- rule /[ \t]+/, 'Text'
35
- rule /[$]#{id}/, 'Name.Variable'
36
- rule /url[(]/, 'Literal.String.Other', :string_url
37
- rule /#{id}(?=\s*[(])/, 'Name.Function'
38
- rule /%#{id}/, 'Name.Decorator'
39
-
40
- # named literals
41
- rule /(true|false)\b/, 'Name.Pseudo'
42
- rule /(and|or|not)\b/, 'Operator.Word'
43
-
44
- # colors and numbers
45
- rule /#[a-z0-9]{1,6}/i, 'Literal.Number.Hex'
46
- rule /-?\d+(%|[a-z]+)?/, 'Literal.Number'
47
- rule /-?\d*\.\d+(%|[a-z]+)?/, 'Literal.Number.Integer'
48
-
49
- mixin :has_strings
50
- mixin :has_interp
51
-
52
- rule /[~^*!&%<>\|+=@:,.\/?-]+/, 'Operator'
53
- rule /[\[\]()]+/, 'Punctuation'
54
- rule %r(/[*]), 'Comment.Multiline', :inline_comment
55
- rule %r(//[^\n]*), 'Comment.Single'
56
-
57
- # identifiers
58
- rule(id) do |m|
59
- if CSS.builtins.include? m[0]
60
- token 'Name.Builtin'
61
- elsif CSS.constants.include? m[0]
62
- token 'Name.Constant'
63
- else
64
- token 'Name'
39
+ state :value do
40
+ mixin :end_section
41
+ rule /[ \t]+/, Text
42
+ rule /[$]#{id}/, Name::Variable
43
+ rule /url[(]/, Str::Other, :string_url
44
+ rule /#{id}(?=\s*[(])/, Name::Function
45
+ rule /%#{id}/, Name::Decorator
46
+
47
+ # named literals
48
+ rule /(true|false)\b/, Name::Builtin::Pseudo
49
+ rule /(and|or|not)\b/, Operator::Word
50
+
51
+ # colors and numbers
52
+ rule /#[a-z0-9]{1,6}/i, Num::Hex
53
+ rule /-?\d+(%|[a-z]+)?/, Num
54
+ rule /-?\d*\.\d+(%|[a-z]+)?/, Num::Integer
55
+
56
+ mixin :has_strings
57
+ mixin :has_interp
58
+
59
+ rule /[~^*!&%<>\|+=@:,.\/?-]+/, Operator
60
+ rule /[\[\]()]+/, Punctuation
61
+ rule %r(/[*]), Comment::Multiline, :inline_comment
62
+ rule %r(//[^\n]*), Comment::Single
63
+
64
+ # identifiers
65
+ rule(id) do |m|
66
+ if CSS.builtins.include? m[0]
67
+ token Name::Builtin
68
+ elsif CSS.constants.include? m[0]
69
+ token Name::Constant
70
+ else
71
+ token Name
72
+ end
65
73
  end
66
74
  end
67
- end
68
75
 
69
- state :has_interp do
70
- rule /[#][{]/, 'Literal.String.Interpol', :interpolation
71
- end
76
+ state :has_interp do
77
+ rule /[#][{]/, Str::Interpol, :interpolation
78
+ end
72
79
 
73
- state :has_strings do
74
- rule /"/, 'Literal.String.Double', :dq
75
- rule /'/, 'Literal.String.Single', :sq
76
- end
80
+ state :has_strings do
81
+ rule /"/, Str::Double, :dq
82
+ rule /'/, Str::Single, :sq
83
+ end
77
84
 
78
- state :interpolation do
79
- rule /}/, 'Literal.String.Interpol', :pop!
80
- mixin :value
81
- end
85
+ state :interpolation do
86
+ rule /}/, Str::Interpol, :pop!
87
+ mixin :value
88
+ end
82
89
 
83
- state :selector do
84
- mixin :end_section
85
-
86
- mixin :has_strings
87
- mixin :has_interp
88
- rule /[ \t]+/, 'Text'
89
- rule /:/, 'Name.Decorator', :pseudo_class
90
- rule /[.]/, 'Name.Class', :class
91
- rule /#/, 'Name.Namespace', :id
92
- rule /%/, 'Name.Variable', :placeholder
93
- rule id, 'Name.Tag'
94
- rule /&/, 'Keyword'
95
- rule /[~^*!&\[\]()<>\|+=@:;,.\/?-]/, 'Operator'
96
- end
90
+ state :selector do
91
+ mixin :end_section
92
+
93
+ mixin :has_strings
94
+ mixin :has_interp
95
+ rule /[ \t]+/, Text
96
+ rule /:/, Name::Decorator, :pseudo_class
97
+ rule /[.]/, Name::Class, :class
98
+ rule /#/, Name::Namespace, :id
99
+ rule /%/, Name::Variable, :placeholder
100
+ rule id, Name::Tag
101
+ rule /&/, Keyword
102
+ rule /[~^*!&\[\]()<>\|+=@:;,.\/?-]/, Operator
103
+ end
97
104
 
98
- state :dq do
99
- rule /"/, 'Literal.String.Double', :pop!
100
- mixin :has_interp
101
- rule /(\\.|#(?![{])|[^\n"#])+/, 'Literal.String.Double'
102
- end
105
+ state :dq do
106
+ rule /"/, Str::Double, :pop!
107
+ mixin :has_interp
108
+ rule /(\\.|#(?![{])|[^\n"#])+/, Str::Double
109
+ end
103
110
 
104
- state :sq do
105
- rule /'/, 'Literal.String.Single', :pop!
106
- mixin :has_interp
107
- rule /(\\.|#(?![{])|[^\n'#])+/, 'Literal.String.Single'
108
- end
111
+ state :sq do
112
+ rule /'/, Str::Single, :pop!
113
+ mixin :has_interp
114
+ rule /(\\.|#(?![{])|[^\n'#])+/, Str::Single
115
+ end
109
116
 
110
- state :string_url do
111
- rule /[)]/, 'Literal.String.Other', :pop!
112
- rule /(\\.|#(?![{])|[^\n)#])+/, 'Literal.String.Other'
113
- mixin :has_interp
114
- end
117
+ state :string_url do
118
+ rule /[)]/, Str::Other, :pop!
119
+ rule /(\\.|#(?![{])|[^\n)#])+/, Str::Other
120
+ mixin :has_interp
121
+ end
115
122
 
116
- state :selector_piece do
117
- mixin :has_interp
118
- rule(//) { pop! }
119
- end
123
+ state :selector_piece do
124
+ mixin :has_interp
125
+ rule(//) { pop! }
126
+ end
120
127
 
121
- state :pseudo_class do
122
- rule id, 'Name.Decorator'
123
- mixin :selector_piece
124
- end
128
+ state :pseudo_class do
129
+ rule id, Name::Decorator
130
+ mixin :selector_piece
131
+ end
125
132
 
126
- state :class do
127
- rule id, 'Name.Class'
128
- mixin :selector_piece
129
- end
133
+ state :class do
134
+ rule id, Name::Class
135
+ mixin :selector_piece
136
+ end
130
137
 
131
- state :id do
132
- rule id, 'Name.Namespace'
133
- mixin :selector_piece
134
- end
138
+ state :id do
139
+ rule id, Name::Namespace
140
+ mixin :selector_piece
141
+ end
135
142
 
136
- state :placeholder do
137
- rule id, 'Name.Variable'
138
- mixin :selector_piece
139
- end
143
+ state :placeholder do
144
+ rule id, Name::Variable
145
+ mixin :selector_piece
146
+ end
140
147
 
141
- state :for do
142
- rule /(from|to|through)/, 'Operator.Word'
143
- mixin :value
144
- end
148
+ state :for do
149
+ rule /(from|to|through)/, Operator::Word
150
+ mixin :value
151
+ end
145
152
 
146
- state :attr_common do
147
- mixin :has_interp
148
- rule id do |m|
149
- if CSS.attributes.include? m[0]
150
- token 'Name.Label'
151
- else
152
- token 'Name.Attribute'
153
+ state :attr_common do
154
+ mixin :has_interp
155
+ rule id do |m|
156
+ if CSS.attributes.include? m[0]
157
+ token Name::Label
158
+ else
159
+ token Name::Attribute
160
+ end
153
161
  end
154
162
  end
155
- end
156
163
 
157
- state :attribute do
158
- mixin :attr_common
164
+ state :attribute do
165
+ mixin :attr_common
159
166
 
160
- rule /([ \t]*)(:)/ do
161
- group 'Text'; group 'Punctuation'
162
- push :value
167
+ rule /([ \t]*)(:)/ do
168
+ group Text; group Punctuation
169
+ push :value
170
+ end
163
171
  end
164
- end
165
172
 
166
- state :inline_comment do
167
- rule /(\\#|#(?=[^\n{])|\*(?=[^\n\/])|[^\n#*])+/, 'Comment.Multiline'
168
- mixin :has_interp
169
- rule %r([*]/), 'Comment.Multiline', :pop!
173
+ state :inline_comment do
174
+ rule /(\\#|#(?=[^\n{])|\*(?=[^\n\/])|[^\n#*])+/, Comment::Multiline
175
+ mixin :has_interp
176
+ rule %r([*]/), Comment::Multiline, :pop!
177
+ end
170
178
  end
171
179
  end
172
180
  end