[ruby-cvs:73334] duerst:r66234 (trunk): remove code duplication and streamline identifiers

duerst at ruby-lang.org duerst at ruby-lang.org
Thu Dec 6 13:46:57 JST 2018


duerst	2018-12-06 13:46:57 +0900 (Thu, 06 Dec 2018)

  New Revision: 66234

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

  Log:
    remove code duplication and streamline identifiers
    
    In regparse.c:
    
    * Reduce coode duplication by merging the almost identical functions
      create_sequence_node and create_alternate_node into a new function
      create_node_from_array, adding a parameter that distinguishes  between
      creating a list and creating an alternative.
    
    * Streamline variable/function naming. Unicode UAX #29 uses 'sequence', but
      the regular expression library uses 'list' for the same concept. Keep
      'sequence' in the ccmments that are taken from UAX #29, but use 'list'
      in variable names.

  Modified files:
    trunk/regparse.c


More information about the ruby-cvs mailing list