Skip to content
This repository
Browse code

Use :opmsg node for "++" in string interpolation logic.

  • Loading branch information...
commit a15d79198a7fc65625e8a07bd6d579625298cf83 1 parent 6b08b70
Christopher Bertels authored August 19, 2011
10  boot/rbx-compiler/parser/fancy.kpeg
@@ -94,15 +94,15 @@ finally = p:p "finally" space+ curly:f ~node(p, :finally, f)
94 94
 
95 95
 catche = p:p "catch" space+ curly:b
96 96
          ~node(p, :catch, b, node(p, :const, "Object"))
97  
-       | p:p "catch" space+ value:v space+ "=>" space+ identifier:i space+ curly:b 
  97
+       | p:p "catch" space+ value:v space+ "=>" space+ identifier:i space+ curly:b
98 98
          ~node(p, :catch, b, v, i)
99  
-       | p:p "catch" space+ value:v space+ curly:b 
  99
+       | p:p "catch" space+ value:v space+ curly:b
100 100
          ~node(p, :catch, b, v)
101 101
 
102 102
 catches = catches:s space+ catche:c {s+[c]}
103 103
         | catche:c {[c]}
104 104
 
105  
-match = p:p "match" space+ chain:v space+ "{" - match_cases:c - "}" 
  105
+match = p:p "match" space+ chain:v space+ "{" - match_cases:c - "}"
106 106
           ~node(p, :match, v, *c)
107 107
 
108 108
 match_cases = match_cases:s - match_case:c {s + [c]}
@@ -195,7 +195,7 @@ quoted_inner(t,q) = p:p "#{" - body?:b - "}" {b}
195 195
 mstr = p:p "\"\"\"" mstr_inner*:b "\"\"\"" ~text_node(p, b)
196 196
 
197 197
 mstr_inner = p:p "#{" - body?:b - "}" {b}
198  
-          | p:p < ("\\\"\"\"" | 
  198
+          | p:p < ("\\\"\"\"" |
199 199
              !&("\"\"\"" | "#{") . | . &("\"\"\""))+ > ~node(p, :text, text)
200 200
 
201 201
 %% {
@@ -244,7 +244,7 @@ mstr_inner = p:p "#{" - body?:b - "}" {b}
244 244
         end
245 245
         return m
246 246
       end
247  
-      node(p, :chain, m, *ary.map { |a| node(p, :message, "++", a) })
  247
+      node(p, :chain, m, *ary.map { |a| node(p, :opmsg, "++", a) })
248 248
     end
249 249
 
250 250
 }
2  boot/rbx-compiler/parser/fancy.kpeg.rb
@@ -405,7 +405,7 @@ def text_node(p, parts)
405 405
         end
406 406
         return m
407 407
       end
408  
-      node(p, :chain, m, *ary.map { |a| node(p, :message, "++", a) })
  408
+      node(p, :chain, m, *ary.map { |a| node(p, :opmsg, "++", a) })
409 409
     end
410 410
 
411 411
 
2  lib/parser/kpeg/fancy.kpeg
@@ -244,6 +244,6 @@ mstr_inner = p:p "#{" - body?:b - "}" {b}
244 244
         end
245 245
         return m
246 246
       end
247  
-      node(p, :chain, m, *ary.map { |a| node(p, :message, "++", a) })
  247
+      node(p, :chain, m, *ary.map { |a| node(p, :opmsg, "++", a) })
248 248
     end
249 249
 }
2  lib/parser/kpeg/fancy.kpeg.rb
@@ -405,7 +405,7 @@ def text_node(p, parts)
405 405
         end
406 406
         return m
407 407
       end
408  
-      node(p, :chain, m, *ary.map { |a| node(p, :message, "++", a) })
  408
+      node(p, :chain, m, *ary.map { |a| node(p, :opmsg, "++", a) })
409 409
     end
410 410
 
411 411
 

0 notes on commit a15d791

Please sign in to comment.
Something went wrong with that request. Please try again.