[ruby-cvs:68245] yui-knk:r61064 (trunk): parse.y: Fix locations of regexp

yui-knk at ruby-lang.org yui-knk at ruby-lang.org
Thu Dec 7 11:36:51 JST 2017


yui-knk	2017-12-07 11:36:51 +0900 (Thu, 07 Dec 2017)

  New Revision: 61064

  https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=61064

  Log:
    parse.y: Fix locations of regexp
    
    * parse.y (new_regexp_gen): Always set locations
      to include locations of tREGEXP_BEG and tREGEXP_END.
    
      e.g. The locations of the NODE_LIT is fixed:
    
      ```
      /a/
      ```
    
      * Before
    
      ```
      NODE_LIT (line: 1, code_range: (1,1)-(1,2))
      ```
    
      * After
    
      ```
      NODE_LIT (line: 1, code_range: (1,0)-(1,3))
      ```

  Modified files:
    trunk/parse.y


More information about the ruby-cvs mailing list