|
4 | 4 | "If you want to provide a fix or improvement, please create a pull request against the original repository.", |
5 | 5 | "Once accepted there, we are happy to receive an update request." |
6 | 6 | ], |
7 | | - "version": "https://github.com/textmate/ruby.tmbundle/commit/4e14bd0a8ffa98a242dc365fb1e26f14e8c5974c", |
| 7 | + "version": "https://github.com/textmate/ruby.tmbundle/commit/74713556df10fbc7b1f9e99013ab1e34cd836f56", |
8 | 8 | "comment": "\n\tTODO: unresolved issues\n\n\ttext:\n\t\"p <<end\n\tprint me!\n\tend\"\n\tsymptoms:\n\tnot recognized as a heredoc\n\tsolution:\n\tthere is no way to distinguish perfectly between the << operator and the start\n\tof a heredoc. Currently, we require assignment to recognize a heredoc. More\n\trefinement is possible.\n\t• Heredocs with indented terminators (<<-) are always distinguishable, however.\n\t• Nested heredocs are not really supportable at present\n\n\ttext:\n\tprint <<-'THERE' \n\tThis is single quoted. \n\tThe above used #{Time.now} \n\tTHERE \n\tsymtoms:\n\tFrom Programming Ruby p306; should be a non-interpolated heredoc.\n\t\n text:\n val?(a):p(b)\n val?'a':'b'\n symptoms:\n ':p' is recognized as a symbol.. its 2 things ':' and 'p'.\n :'b' has same problem.\n solution:\n ternary operator rule, precedence stuff, symbol rule.\n but also consider 'a.b?(:c)' ??\n", |
9 | 9 | "fileTypes": [ |
10 | 10 | "rb", |
|
158 | 158 | }, |
159 | 159 | { |
160 | 160 | "comment": " everything being a method but having a special function is a..", |
161 | | - "match": "\\b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|protected|refine|using)\\b(?![?!])", |
| 161 | + "match": "\\b(initialize|new|loop|include|extend|prepend|fail|raise|attr_reader|attr_writer|attr_accessor|attr|catch|throw|private|private_class_method|module_function|public|public_class_method|protected|refine|using)\\b(?![?!])", |
162 | 162 | "name": "keyword.other.special-method.ruby" |
163 | 163 | }, |
164 | 164 | { |
|
283 | 283 | "match": "\\G([&*]?)(?:([_a-zA-Z]\\w*(:))|([_a-zA-Z]\\w*))" |
284 | 284 | }, |
285 | 285 | { |
286 | | - "begin": "\\(", |
287 | | - "captures": { |
288 | | - "0": { |
289 | | - "name": "punctuation.section.function.ruby" |
290 | | - } |
291 | | - }, |
292 | | - "comment": "Prevent end pattern of parent rule from ending prematurely.", |
293 | | - "end": "\\)", |
294 | | - "patterns": [ |
295 | | - { |
296 | | - "include": "$self" |
297 | | - } |
298 | | - ] |
| 286 | + "include": "#parens" |
| 287 | + }, |
| 288 | + { |
| 289 | + "include": "#braces" |
299 | 290 | }, |
300 | 291 | { |
301 | 292 | "include": "$self" |
302 | 293 | } |
303 | 294 | ] |
304 | 295 | } |
305 | | - ] |
| 296 | + ], |
| 297 | + "repository": { |
| 298 | + "braces": { |
| 299 | + "begin": "\\{", |
| 300 | + "beginCaptures": { |
| 301 | + "0": { |
| 302 | + "name": "punctuation.section.function.begin.ruby" |
| 303 | + } |
| 304 | + }, |
| 305 | + "end": "\\}", |
| 306 | + "endCaptures": { |
| 307 | + "0": { |
| 308 | + "name": "punctuation.section.function.end.ruby" |
| 309 | + } |
| 310 | + }, |
| 311 | + "patterns": [ |
| 312 | + { |
| 313 | + "include": "#parens" |
| 314 | + }, |
| 315 | + { |
| 316 | + "include": "#braces" |
| 317 | + }, |
| 318 | + { |
| 319 | + "include": "$self" |
| 320 | + } |
| 321 | + ] |
| 322 | + }, |
| 323 | + "parens": { |
| 324 | + "begin": "\\(", |
| 325 | + "beginCaptures": { |
| 326 | + "0": { |
| 327 | + "name": "punctuation.section.function.begin.ruby" |
| 328 | + } |
| 329 | + }, |
| 330 | + "end": "\\)", |
| 331 | + "endCaptures": { |
| 332 | + "0": { |
| 333 | + "name": "punctuation.section.function.end.ruby" |
| 334 | + } |
| 335 | + }, |
| 336 | + "patterns": [ |
| 337 | + { |
| 338 | + "include": "#parens" |
| 339 | + }, |
| 340 | + { |
| 341 | + "include": "#braces" |
| 342 | + }, |
| 343 | + { |
| 344 | + "include": "$self" |
| 345 | + } |
| 346 | + ] |
| 347 | + } |
| 348 | + } |
306 | 349 | }, |
307 | 350 | { |
308 | 351 | "begin": "(?x)\n\t\t\t (?=def\\b) # an optimization to help Oniguruma fail fast\n\t\t\t (?<=^|\\s)(def)\\s+ # the def keyword\n\t\t\t ( (?>[a-zA-Z_]\\w*(?>\\.|::))? # a method name prefix\n\t\t\t (?>[a-zA-Z_]\\w*(?>[?!]|=(?!>))? # the method name\n\t\t\t |===?|!=|!~|>[>=]?|<=>|<[<=]?|[%&`/\\|^]|\\*\\*?|=?~|[-+]@?|\\[\\]=?) ) # …or an operator method\n\t\t\t [ \\t] # the space separating the arguments\n\t\t\t (?=[ \\t]*[^\\s#;]) # make sure arguments and not a comment follow\n\t\t\t ", |
|
365 | 408 | "name": "constant.numeric.float.ruby" |
366 | 409 | }, |
367 | 410 | { |
368 | | - "match": "\\b(0[dD]\\d|[1-9])(?>_?\\d)*r?i?\\b", |
| 411 | + "match": "\\b(0|(0[dD]\\d|[1-9])(?>_?\\d)*)r?i?\\b", |
369 | 412 | "name": "constant.numeric.integer.ruby" |
370 | 413 | }, |
371 | 414 | { |
|
0 commit comments