Sha256: a68edff7251007bfa341b1997465c7eb4f43795e69d14138b090dca4d7f4bf42
Contents?: true
Size: 807 Bytes
Versions: 13
Compression:
Stored size: 807 Bytes
Contents
%%{ machine re_property; property_char = [pP]; property_sequence = property_char . '{' . '^'? (alnum|space|[_\-\.=])+ '}'; action premature_property_end { raise PrematureEndError.new('unicode property') } # Unicode properties scanner # -------------------------------------------------------------------------- unicode_property := |* property_sequence < eof(premature_property_end) { text = copy(data, ts-1, te) type = (text[1] == 'P') ^ (text[3] == '^') ? :nonproperty : :property name = data[ts+2..te-2].pack('c*').gsub(/[\^\s_\-]/, '').downcase token = self.class.short_prop_map[name] || self.class.long_prop_map[name] validation_error(:property, name) unless token self.emit(type, token.to_sym, text) fret; }; *|; }%%
Version data entries
13 entries across 13 versions & 4 rubygems