sass-embedded 1.6.2 → 1.83.1

Sign up to get free protection for your applications and to get access to all the features.
Files changed (85) hide show
  1. checksums.yaml +4 -4
  2. data/README.md +9 -3
  3. data/exe/sass +13 -0
  4. data/ext/sass/Rakefile +352 -76
  5. data/ext/sass/embedded_sass_pb.rb +61 -0
  6. data/ext/sass/expand-archive.ps1 +1 -0
  7. data/ext/sass/package.json +1 -1
  8. data/lib/sass/calculation_value/calculation_operation.rb +49 -0
  9. data/lib/sass/calculation_value.rb +22 -0
  10. data/lib/sass/canonicalize_context.rb +25 -0
  11. data/lib/sass/compile_result.rb +3 -2
  12. data/lib/sass/compiler/channel.rb +68 -0
  13. data/lib/sass/compiler/connection.rb +89 -0
  14. data/lib/sass/compiler/dispatcher.rb +116 -0
  15. data/lib/sass/{embedded → compiler}/host/function_registry.rb +31 -34
  16. data/lib/sass/compiler/host/importer_registry.rb +141 -0
  17. data/lib/sass/compiler/host/logger_registry.rb +80 -0
  18. data/lib/sass/compiler/host/protofier.rb +360 -0
  19. data/lib/sass/compiler/host/structifier.rb +37 -0
  20. data/lib/sass/compiler/host.rb +226 -0
  21. data/lib/sass/{embedded → compiler}/varint.rb +9 -5
  22. data/lib/sass/compiler.rb +212 -0
  23. data/lib/sass/elf.rb +222 -0
  24. data/lib/sass/embedded/version.rb +2 -2
  25. data/lib/sass/embedded.rb +76 -204
  26. data/lib/sass/embedded_protocol.rb +10 -0
  27. data/lib/sass/exception.rb +74 -0
  28. data/lib/sass/fork_tracker.rb +51 -0
  29. data/lib/sass/logger/silent.rb +5 -3
  30. data/lib/sass/logger/source_location.rb +6 -5
  31. data/lib/sass/logger/source_span.rb +8 -7
  32. data/lib/sass/node_package_importer.rb +17 -0
  33. data/lib/sass/serializer.rb +30 -0
  34. data/lib/sass/value/argument_list.rb +13 -6
  35. data/lib/sass/value/boolean.rb +1 -1
  36. data/lib/sass/value/calculation.rb +90 -0
  37. data/lib/sass/value/color/channel.rb +79 -0
  38. data/lib/sass/value/color/conversions.rb +473 -0
  39. data/lib/sass/value/color/gamut_map_method/clip.rb +45 -0
  40. data/lib/sass/value/color/gamut_map_method/local_minde.rb +94 -0
  41. data/lib/sass/value/color/gamut_map_method.rb +45 -0
  42. data/lib/sass/value/color/interpolation_method.rb +51 -0
  43. data/lib/sass/value/color/space/a98_rgb.rb +57 -0
  44. data/lib/sass/value/color/space/display_p3.rb +57 -0
  45. data/lib/sass/value/color/space/hsl.rb +65 -0
  46. data/lib/sass/value/color/space/hwb.rb +70 -0
  47. data/lib/sass/value/color/space/lab.rb +77 -0
  48. data/lib/sass/value/color/space/lch.rb +53 -0
  49. data/lib/sass/value/color/space/lms.rb +129 -0
  50. data/lib/sass/value/color/space/oklab.rb +66 -0
  51. data/lib/sass/value/color/space/oklch.rb +54 -0
  52. data/lib/sass/value/color/space/prophoto_rgb.rb +59 -0
  53. data/lib/sass/value/color/space/rec2020.rb +69 -0
  54. data/lib/sass/value/color/space/rgb.rb +52 -0
  55. data/lib/sass/value/color/space/srgb.rb +140 -0
  56. data/lib/sass/value/color/space/srgb_linear.rb +72 -0
  57. data/lib/sass/value/color/space/utils.rb +86 -0
  58. data/lib/sass/value/color/space/xyz_d50.rb +100 -0
  59. data/lib/sass/value/color/space/xyz_d65.rb +57 -0
  60. data/lib/sass/value/color/space.rb +198 -0
  61. data/lib/sass/value/color.rb +538 -163
  62. data/lib/sass/value/function.rb +11 -16
  63. data/lib/sass/value/fuzzy_math.rb +24 -21
  64. data/lib/sass/value/list.rb +7 -7
  65. data/lib/sass/value/map.rb +6 -6
  66. data/lib/sass/value/mixin.rb +34 -0
  67. data/lib/sass/value/null.rb +1 -1
  68. data/lib/sass/value/number/unit.rb +7 -6
  69. data/lib/sass/value/number.rb +34 -26
  70. data/lib/sass/value/string.rb +9 -3
  71. data/lib/sass/value.rb +20 -16
  72. metadata +67 -103
  73. data/ext/sass/unzip.vbs +0 -13
  74. data/lib/sass/compile_error.rb +0 -28
  75. data/lib/sass/embedded/async.rb +0 -65
  76. data/lib/sass/embedded/channel.rb +0 -61
  77. data/lib/sass/embedded/compiler.rb +0 -60
  78. data/lib/sass/embedded/dispatcher.rb +0 -90
  79. data/lib/sass/embedded/host/importer_registry.rb +0 -107
  80. data/lib/sass/embedded/host/logger_registry.rb +0 -50
  81. data/lib/sass/embedded/host/value_protofier.rb +0 -241
  82. data/lib/sass/embedded/host.rb +0 -139
  83. data/lib/sass/embedded/protofier.rb +0 -78
  84. data/lib/sass/embedded/structifier.rb +0 -36
  85. data/lib/sass/script_error.rb +0 -6
@@ -0,0 +1,61 @@
1
+ # frozen_string_literal: true
2
+ # Generated by the protocol buffer compiler. DO NOT EDIT!
3
+ # source: embedded_sass.proto
4
+
5
+ require 'google/protobuf'
6
+
7
+
8
+ descriptor_data = "\n\x13\x65mbedded_sass.proto\x12\x16sass.embedded_protocol\"\xe8\x10\n\x0eInboundMessage\x12P\n\x0f\x63ompile_request\x18\x02 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.CompileRequestH\x00\x12\\\n\x15\x63\x61nonicalize_response\x18\x03 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.CanonicalizeResponseH\x00\x12P\n\x0fimport_response\x18\x04 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.ImportResponseH\x00\x12Y\n\x14\x66ile_import_response\x18\x05 \x01(\x0b\x32\x39.sass.embedded_protocol.InboundMessage.FileImportResponseH\x00\x12]\n\x16\x66unction_call_response\x18\x06 \x01(\x0b\x32;.sass.embedded_protocol.InboundMessage.FunctionCallResponseH\x00\x12P\n\x0fversion_request\x18\x07 \x01(\x0b\x32\x35.sass.embedded_protocol.InboundMessage.VersionRequestH\x00\x1a\x1c\n\x0eVersionRequest\x12\n\n\x02id\x18\x01 \x01(\r\x1a\x98\x07\n\x0e\x43ompileRequest\x12S\n\x06string\x18\x02 \x01(\x0b\x32\x41.sass.embedded_protocol.InboundMessage.CompileRequest.StringInputH\x00\x12\x0e\n\x04path\x18\x03 \x01(\tH\x00\x12\x32\n\x05style\x18\x04 \x01(\x0e\x32#.sass.embedded_protocol.OutputStyle\x12\x12\n\nsource_map\x18\x05 \x01(\x08\x12Q\n\timporters\x18\x06 \x03(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x12\x18\n\x10global_functions\x18\x07 \x03(\t\x12\x13\n\x0b\x61lert_color\x18\x08 \x01(\x08\x12\x13\n\x0b\x61lert_ascii\x18\t \x01(\x08\x12\x0f\n\x07verbose\x18\n \x01(\x08\x12\x12\n\nquiet_deps\x18\x0b \x01(\x08\x12\"\n\x1asource_map_include_sources\x18\x0c \x01(\x08\x12\x0f\n\x07\x63harset\x18\r \x01(\x08\x12\x0e\n\x06silent\x18\x0e \x01(\x08\x12\x19\n\x11\x66\x61tal_deprecation\x18\x0f \x03(\t\x12\x1b\n\x13silence_deprecation\x18\x10 \x03(\t\x12\x1a\n\x12\x66uture_deprecation\x18\x11 \x03(\t\x1a\xac\x01\n\x0bStringInput\x12\x0e\n\x06source\x18\x01 \x01(\t\x12\x0b\n\x03url\x18\x02 \x01(\t\x12.\n\x06syntax\x18\x03 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12P\n\x08importer\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.InboundMessage.CompileRequest.Importer\x1a\xc5\x01\n\x08Importer\x12\x0e\n\x04path\x18\x01 \x01(\tH\x00\x12\x15\n\x0bimporter_id\x18\x02 \x01(\rH\x00\x12\x1a\n\x10\x66ile_importer_id\x18\x03 \x01(\rH\x00\x12L\n\x15node_package_importer\x18\x05 \x01(\x0b\x32+.sass.embedded_protocol.NodePackageImporterH\x00\x12\x1c\n\x14non_canonical_scheme\x18\x04 \x03(\tB\n\n\x08importerB\x07\n\x05inputJ\x04\x08\x01\x10\x02\x1ak\n\x14\x43\x61nonicalizeResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\r\n\x03url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x93\x02\n\x0eImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12V\n\x07success\x18\x02 \x01(\x0b\x32\x43.sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccessH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x1a\x81\x01\n\rImportSuccess\x12\x10\n\x08\x63ontents\x18\x01 \x01(\t\x12.\n\x06syntax\x18\x02 \x01(\x0e\x32\x1e.sass.embedded_protocol.Syntax\x12\x1b\n\x0esource_map_url\x18\x03 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_source_map_urlB\x08\n\x06result\x1an\n\x12\x46ileImportResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x12\n\x08\x66ile_url\x18\x02 \x01(\tH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1d\n\x15\x63ontaining_url_unused\x18\x04 \x01(\x08\x42\x08\n\x06result\x1a\x90\x01\n\x14\x46unctionCallResponse\x12\n\n\x02id\x18\x01 \x01(\r\x12\x30\n\x07success\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.ValueH\x00\x12\x0f\n\x05\x65rror\x18\x03 \x01(\tH\x00\x12\x1f\n\x17\x61\x63\x63\x65ssed_argument_lists\x18\x04 \x03(\rB\x08\n\x06resultB\t\n\x07message\"\xcb\x0f\n\x0fOutboundMessage\x12\x36\n\x05\x65rror\x18\x01 \x01(\x0b\x32%.sass.embedded_protocol.ProtocolErrorH\x00\x12S\n\x10\x63ompile_response\x18\x02 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.CompileResponseH\x00\x12\x45\n\tlog_event\x18\x03 \x01(\x0b\x32\x30.sass.embedded_protocol.OutboundMessage.LogEventH\x00\x12[\n\x14\x63\x61nonicalize_request\x18\x04 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.CanonicalizeRequestH\x00\x12O\n\x0eimport_request\x18\x05 \x01(\x0b\x32\x35.sass.embedded_protocol.OutboundMessage.ImportRequestH\x00\x12X\n\x13\x66ile_import_request\x18\x06 \x01(\x0b\x32\x39.sass.embedded_protocol.OutboundMessage.FileImportRequestH\x00\x12\\\n\x15\x66unction_call_request\x18\x07 \x01(\x0b\x32;.sass.embedded_protocol.OutboundMessage.FunctionCallRequestH\x00\x12S\n\x10version_response\x18\x08 \x01(\x0b\x32\x37.sass.embedded_protocol.OutboundMessage.VersionResponseH\x00\x1a\x8e\x01\n\x0fVersionResponse\x12\n\n\x02id\x18\x05 \x01(\r\x12\x18\n\x10protocol_version\x18\x01 \x01(\t\x12\x18\n\x10\x63ompiler_version\x18\x02 \x01(\t\x12\x1e\n\x16implementation_version\x18\x03 \x01(\t\x12\x1b\n\x13implementation_name\x18\x04 \x01(\t\x1a\xa2\x03\n\x0f\x43ompileResponse\x12Y\n\x07success\x18\x02 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccessH\x00\x12Y\n\x07\x66\x61ilure\x18\x03 \x01(\x0b\x32\x46.sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailureH\x00\x12\x13\n\x0bloaded_urls\x18\x04 \x03(\t\x1a\x37\n\x0e\x43ompileSuccess\x12\x0b\n\x03\x63ss\x18\x01 \x01(\t\x12\x12\n\nsource_map\x18\x02 \x01(\tJ\x04\x08\x03\x10\x04\x1a{\n\x0e\x43ompileFailure\x12\x0f\n\x07message\x18\x01 \x01(\t\x12\x30\n\x04span\x18\x02 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpan\x12\x13\n\x0bstack_trace\x18\x03 \x01(\t\x12\x11\n\tformatted\x18\x04 \x01(\tB\x08\n\x06resultJ\x04\x08\x01\x10\x02\x1a\xf1\x01\n\x08LogEvent\x12\x32\n\x04type\x18\x02 \x01(\x0e\x32$.sass.embedded_protocol.LogEventType\x12\x0f\n\x07message\x18\x03 \x01(\t\x12\x35\n\x04span\x18\x04 \x01(\x0b\x32\".sass.embedded_protocol.SourceSpanH\x00\x88\x01\x01\x12\x13\n\x0bstack_trace\x18\x05 \x01(\t\x12\x11\n\tformatted\x18\x06 \x01(\t\x12\x1d\n\x10\x64\x65precation_type\x18\x07 \x01(\tH\x01\x88\x01\x01\x42\x07\n\x05_spanB\x13\n\x11_deprecation_typeJ\x04\x08\x01\x10\x02\x1a\x8e\x01\n\x13\x43\x61nonicalizeRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x43\n\rImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\tJ\x04\x08\x02\x10\x03\x1a\x8c\x01\n\x11\x46ileImportRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x13\n\x0bimporter_id\x18\x03 \x01(\r\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x13\n\x0b\x66rom_import\x18\x05 \x01(\x08\x12\x1b\n\x0e\x63ontaining_url\x18\x06 \x01(\tH\x00\x88\x01\x01\x42\x11\n\x0f_containing_urlJ\x04\x08\x02\x10\x03\x1a\x8e\x01\n\x13\x46unctionCallRequest\x12\n\n\x02id\x18\x01 \x01(\r\x12\x0e\n\x04name\x18\x03 \x01(\tH\x00\x12\x15\n\x0b\x66unction_id\x18\x04 \x01(\rH\x00\x12\x30\n\targuments\x18\x05 \x03(\x0b\x32\x1d.sass.embedded_protocol.ValueB\x0c\n\nidentifierJ\x04\x08\x02\x10\x03\x42\t\n\x07message\"e\n\rProtocolError\x12\x37\n\x04type\x18\x01 \x01(\x0e\x32).sass.embedded_protocol.ProtocolErrorType\x12\n\n\x02id\x18\x02 \x01(\r\x12\x0f\n\x07message\x18\x03 \x01(\t\"\x87\x02\n\nSourceSpan\x12\x0c\n\x04text\x18\x01 \x01(\t\x12@\n\x05start\x18\x02 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocation\x12\x43\n\x03\x65nd\x18\x03 \x01(\x0b\x32\x31.sass.embedded_protocol.SourceSpan.SourceLocationH\x00\x88\x01\x01\x12\x0b\n\x03url\x18\x04 \x01(\t\x12\x0f\n\x07\x63ontext\x18\x05 \x01(\t\x1a>\n\x0eSourceLocation\x12\x0e\n\x06offset\x18\x01 \x01(\r\x12\x0c\n\x04line\x18\x02 \x01(\r\x12\x0e\n\x06\x63olumn\x18\x03 \x01(\rB\x06\n\x04_end\"\xf8\x11\n\x05Value\x12\x36\n\x06string\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.StringH\x00\x12\x36\n\x06number\x18\x02 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x32\n\x04list\x18\x05 \x01(\x0b\x32\".sass.embedded_protocol.Value.ListH\x00\x12\x30\n\x03map\x18\x06 \x01(\x0b\x32!.sass.embedded_protocol.Value.MapH\x00\x12;\n\tsingleton\x18\x07 \x01(\x0e\x32&.sass.embedded_protocol.SingletonValueH\x00\x12K\n\x11\x63ompiler_function\x18\x08 \x01(\x0b\x32..sass.embedded_protocol.Value.CompilerFunctionH\x00\x12\x43\n\rhost_function\x18\t \x01(\x0b\x32*.sass.embedded_protocol.Value.HostFunctionH\x00\x12\x43\n\rargument_list\x18\n \x01(\x0b\x32*.sass.embedded_protocol.Value.ArgumentListH\x00\x12@\n\x0b\x63\x61lculation\x18\x0c \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x12\x45\n\x0e\x63ompiler_mixin\x18\r \x01(\x0b\x32+.sass.embedded_protocol.Value.CompilerMixinH\x00\x12\x34\n\x05\x63olor\x18\x0e \x01(\x0b\x32#.sass.embedded_protocol.Value.ColorH\x00\x1a&\n\x06String\x12\x0c\n\x04text\x18\x01 \x01(\t\x12\x0e\n\x06quoted\x18\x02 \x01(\x08\x1a\x41\n\x06Number\x12\r\n\x05value\x18\x01 \x01(\x01\x12\x12\n\nnumerators\x18\x02 \x03(\t\x12\x14\n\x0c\x64\x65nominators\x18\x03 \x03(\t\x1a\xa0\x01\n\x05\x43olor\x12\r\n\x05space\x18\x01 \x01(\t\x12\x15\n\x08\x63hannel1\x18\x02 \x01(\x01H\x00\x88\x01\x01\x12\x15\n\x08\x63hannel2\x18\x03 \x01(\x01H\x01\x88\x01\x01\x12\x15\n\x08\x63hannel3\x18\x04 \x01(\x01H\x02\x88\x01\x01\x12\x12\n\x05\x61lpha\x18\x05 \x01(\x01H\x03\x88\x01\x01\x42\x0b\n\t_channel1B\x0b\n\t_channel2B\x0b\n\t_channel3B\x08\n\x06_alpha\x1a\x87\x01\n\x04List\x12\x38\n\tseparator\x18\x01 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12\x14\n\x0chas_brackets\x18\x02 \x01(\x08\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\xa2\x01\n\x03Map\x12\x38\n\x07\x65ntries\x18\x01 \x03(\x0b\x32\'.sass.embedded_protocol.Value.Map.Entry\x1a\x61\n\x05\x45ntry\x12*\n\x03key\x18\x01 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value\x1a\x1e\n\x10\x43ompilerFunction\x12\n\n\x02id\x18\x01 \x01(\r\x1a-\n\x0cHostFunction\x12\n\n\x02id\x18\x01 \x01(\r\x12\x11\n\tsignature\x18\x02 \x01(\t\x1a\x1b\n\rCompilerMixin\x12\n\n\x02id\x18\x01 \x01(\r\x1a\xa1\x02\n\x0c\x41rgumentList\x12\n\n\x02id\x18\x01 \x01(\r\x12\x38\n\tseparator\x18\x02 \x01(\x0e\x32%.sass.embedded_protocol.ListSeparator\x12/\n\x08\x63ontents\x18\x03 \x03(\x0b\x32\x1d.sass.embedded_protocol.Value\x12J\n\x08keywords\x18\x04 \x03(\x0b\x32\x38.sass.embedded_protocol.Value.ArgumentList.KeywordsEntry\x1aN\n\rKeywordsEntry\x12\x0b\n\x03key\x18\x01 \x01(\t\x12,\n\x05value\x18\x02 \x01(\x0b\x32\x1d.sass.embedded_protocol.Value:\x02\x38\x01\x1a\xef\x04\n\x0b\x43\x61lculation\x12\x0c\n\x04name\x18\x01 \x01(\t\x12M\n\targuments\x18\x02 \x03(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x1a\x95\x02\n\x10\x43\x61lculationValue\x12\x36\n\x06number\x18\x01 \x01(\x0b\x32$.sass.embedded_protocol.Value.NumberH\x00\x12\x10\n\x06string\x18\x02 \x01(\tH\x00\x12\x17\n\rinterpolation\x18\x03 \x01(\tH\x00\x12S\n\toperation\x18\x04 \x01(\x0b\x32>.sass.embedded_protocol.Value.Calculation.CalculationOperationH\x00\x12@\n\x0b\x63\x61lculation\x18\x05 \x01(\x0b\x32).sass.embedded_protocol.Value.CalculationH\x00\x42\x07\n\x05value\x1a\xea\x01\n\x14\x43\x61lculationOperation\x12=\n\x08operator\x18\x01 \x01(\x0e\x32+.sass.embedded_protocol.CalculationOperator\x12H\n\x04left\x18\x02 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValue\x12I\n\x05right\x18\x03 \x01(\x0b\x32:.sass.embedded_protocol.Value.Calculation.CalculationValueB\x07\n\x05value\"4\n\x13NodePackageImporter\x12\x1d\n\x15\x65ntry_point_directory\x18\x01 \x01(\t*+\n\x0bOutputStyle\x12\x0c\n\x08\x45XPANDED\x10\x00\x12\x0e\n\nCOMPRESSED\x10\x01*)\n\x06Syntax\x12\x08\n\x04SCSS\x10\x00\x12\x0c\n\x08INDENTED\x10\x01\x12\x07\n\x03\x43SS\x10\x02*?\n\x0cLogEventType\x12\x0b\n\x07WARNING\x10\x00\x12\x17\n\x13\x44\x45PRECATION_WARNING\x10\x01\x12\t\n\x05\x44\x45\x42UG\x10\x02*8\n\x11ProtocolErrorType\x12\t\n\x05PARSE\x10\x00\x12\n\n\x06PARAMS\x10\x01\x12\x0c\n\x08INTERNAL\x10\x02*?\n\rListSeparator\x12\t\n\x05\x43OMMA\x10\x00\x12\t\n\x05SPACE\x10\x01\x12\t\n\x05SLASH\x10\x02\x12\r\n\tUNDECIDED\x10\x03*/\n\x0eSingletonValue\x12\x08\n\x04TRUE\x10\x00\x12\t\n\x05\x46\x41LSE\x10\x01\x12\x08\n\x04NULL\x10\x02*A\n\x13\x43\x61lculationOperator\x12\x08\n\x04PLUS\x10\x00\x12\t\n\x05MINUS\x10\x01\x12\t\n\x05TIMES\x10\x02\x12\n\n\x06\x44IVIDE\x10\x03\x42#\n\x1f\x63om.sass_lang.embedded_protocolP\x01\x62\x06proto3"
9
+
10
+ pool = Google::Protobuf::DescriptorPool.generated_pool
11
+ pool.add_serialized_file(descriptor_data)
12
+
13
+ module Sass
14
+ module EmbeddedProtocol
15
+ InboundMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage").msgclass
16
+ InboundMessage::VersionRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.VersionRequest").msgclass
17
+ InboundMessage::CompileRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.CompileRequest").msgclass
18
+ InboundMessage::CompileRequest::StringInput = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.CompileRequest.StringInput").msgclass
19
+ InboundMessage::CompileRequest::Importer = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.CompileRequest.Importer").msgclass
20
+ InboundMessage::CanonicalizeResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.CanonicalizeResponse").msgclass
21
+ InboundMessage::ImportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.ImportResponse").msgclass
22
+ InboundMessage::ImportResponse::ImportSuccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.ImportResponse.ImportSuccess").msgclass
23
+ InboundMessage::FileImportResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.FileImportResponse").msgclass
24
+ InboundMessage::FunctionCallResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.InboundMessage.FunctionCallResponse").msgclass
25
+ OutboundMessage = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage").msgclass
26
+ OutboundMessage::VersionResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.VersionResponse").msgclass
27
+ OutboundMessage::CompileResponse = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.CompileResponse").msgclass
28
+ OutboundMessage::CompileResponse::CompileSuccess = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.CompileResponse.CompileSuccess").msgclass
29
+ OutboundMessage::CompileResponse::CompileFailure = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.CompileResponse.CompileFailure").msgclass
30
+ OutboundMessage::LogEvent = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.LogEvent").msgclass
31
+ OutboundMessage::CanonicalizeRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.CanonicalizeRequest").msgclass
32
+ OutboundMessage::ImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.ImportRequest").msgclass
33
+ OutboundMessage::FileImportRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.FileImportRequest").msgclass
34
+ OutboundMessage::FunctionCallRequest = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutboundMessage.FunctionCallRequest").msgclass
35
+ ProtocolError = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.ProtocolError").msgclass
36
+ SourceSpan = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.SourceSpan").msgclass
37
+ SourceSpan::SourceLocation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.SourceSpan.SourceLocation").msgclass
38
+ Value = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value").msgclass
39
+ Value::String = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.String").msgclass
40
+ Value::Number = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Number").msgclass
41
+ Value::Color = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Color").msgclass
42
+ Value::List = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.List").msgclass
43
+ Value::Map = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Map").msgclass
44
+ Value::Map::Entry = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Map.Entry").msgclass
45
+ Value::CompilerFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.CompilerFunction").msgclass
46
+ Value::HostFunction = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.HostFunction").msgclass
47
+ Value::CompilerMixin = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.CompilerMixin").msgclass
48
+ Value::ArgumentList = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.ArgumentList").msgclass
49
+ Value::Calculation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Calculation").msgclass
50
+ Value::Calculation::CalculationValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Calculation.CalculationValue").msgclass
51
+ Value::Calculation::CalculationOperation = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Value.Calculation.CalculationOperation").msgclass
52
+ NodePackageImporter = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.NodePackageImporter").msgclass
53
+ OutputStyle = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.OutputStyle").enummodule
54
+ Syntax = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.Syntax").enummodule
55
+ LogEventType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.LogEventType").enummodule
56
+ ProtocolErrorType = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.ProtocolErrorType").enummodule
57
+ ListSeparator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.ListSeparator").enummodule
58
+ SingletonValue = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.SingletonValue").enummodule
59
+ CalculationOperator = ::Google::Protobuf::DescriptorPool.generated_pool.lookup("sass.embedded_protocol.CalculationOperator").enummodule
60
+ end
61
+ end
@@ -0,0 +1 @@
1
+ Expand-Archive @args
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "dependencies": {
3
- "sass-embedded": "1.52.3"
3
+ "sass": "1.83.1"
4
4
  }
5
5
  }
@@ -0,0 +1,49 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ module CalculationValue
5
+ # A binary operation that can appear in a SassCalculation.
6
+ #
7
+ # @see https://sass-lang.com/documentation/js-api/classes/calculationoperation/
8
+ class CalculationOperation
9
+ include CalculationValue
10
+
11
+ OPERATORS = %w[+ - * /].freeze
12
+
13
+ private_constant :OPERATORS
14
+
15
+ # @param operator [::String]
16
+ # @param left [CalculationValue]
17
+ # @param right [CalculationValue]
18
+ def initialize(operator, left, right)
19
+ raise Sass::ScriptError, "Invalid operator: #{operator}" unless OPERATORS.include?(operator)
20
+
21
+ @operator = operator.freeze
22
+ @left = assert_calculation_value(left, 'left')
23
+ @right = assert_calculation_value(right, 'right')
24
+ end
25
+
26
+ # @return [::String]
27
+ attr_reader :operator
28
+
29
+ # @return [CalculationValue]
30
+ attr_reader :left
31
+
32
+ # @return [CalculationValue]
33
+ attr_reader :right
34
+
35
+ # @return [::Boolean]
36
+ def ==(other)
37
+ other.is_a?(Sass::CalculationValue::CalculationOperation) &&
38
+ other.operator == operator &&
39
+ other.left == left &&
40
+ other.right == right
41
+ end
42
+
43
+ # @return [Integer]
44
+ def hash
45
+ @hash ||= [operator, left, right].hash
46
+ end
47
+ end
48
+ end
49
+ end
@@ -0,0 +1,22 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ # The type of values that can be arguments to a SassCalculation.
5
+ #
6
+ # @see https://sass-lang.com/documentation/js-api/types/calculationvalue/
7
+ module CalculationValue
8
+ private
9
+
10
+ def assert_calculation_value(value, name = nil)
11
+ if !value.is_a?(Sass::CalculationValue) || (value.is_a?(Sass::Value::String) && value.quoted?)
12
+ raise Sass::ScriptError.new(
13
+ "#{value} must be one of SassNumber, unquoted SassString, SassCalculation, CalculationOperation", name
14
+ )
15
+ end
16
+
17
+ value
18
+ end
19
+ end
20
+ end
21
+
22
+ require_relative 'calculation_value/calculation_operation'
@@ -0,0 +1,25 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ # Contextual information passed to `canonicalize` and `find_file_url`.
5
+ # Not all importers will need this information to resolve loads, but some may find it useful.
6
+ #
7
+ # @see https://sass-lang.com/documentation/js-api/interfaces/canonicalizecontext/
8
+ class CanonicalizeContext
9
+ # @return [String, nil]
10
+ def containing_url
11
+ @containing_url_unused = false
12
+ @containing_url
13
+ end
14
+
15
+ # @return [Boolean]
16
+ attr_reader :from_import
17
+
18
+ # @!visibility private
19
+ def initialize(canonicalize_request)
20
+ @containing_url_unused = true
21
+ @containing_url = canonicalize_request.containing_url == '' ? nil : canonicalize_request.containing_url
22
+ @from_import = canonicalize_request.from_import
23
+ end
24
+ end
25
+ end
@@ -3,7 +3,7 @@
3
3
  module Sass
4
4
  # The result of compiling Sass to CSS. Returned by {Sass.compile} and {Sass.compile_string}.
5
5
  #
6
- # @see https://sass-lang.com/documentation/js-api/interfaces/CompileResult
6
+ # @see https://sass-lang.com/documentation/js-api/interfaces/compileresult/
7
7
  class CompileResult
8
8
  # @return [String]
9
9
  attr_reader :css
@@ -14,9 +14,10 @@ module Sass
14
14
  # @return [Array<String>]
15
15
  attr_reader :loaded_urls
16
16
 
17
+ # @!visibility private
17
18
  def initialize(css, source_map, loaded_urls)
18
19
  @css = css
19
- @source_map = source_map == '' ? nil : source_map
20
+ @source_map = source_map
20
21
  @loaded_urls = loaded_urls
21
22
  end
22
23
  end
@@ -0,0 +1,68 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class Compiler
5
+ # The {Channel} class.
6
+ #
7
+ # It manages the lifecycle of {Dispatcher}.
8
+ class Channel
9
+ def initialize(dispatcher_class)
10
+ @dispatcher_class = dispatcher_class
11
+ @dispatcher = @dispatcher_class.new
12
+ @mutex = Mutex.new
13
+ end
14
+
15
+ def close
16
+ @mutex.synchronize do
17
+ unless @dispatcher.nil?
18
+ @dispatcher.close
19
+ @dispatcher = nil
20
+ end
21
+ end
22
+ end
23
+
24
+ def closed?
25
+ @mutex.synchronize do
26
+ @dispatcher.nil?
27
+ end
28
+ end
29
+
30
+ def stream(host)
31
+ @mutex.synchronize do
32
+ raise IOError, 'closed compiler' if @dispatcher.nil?
33
+
34
+ Stream.new(@dispatcher, host)
35
+ rescue Errno::EBUSY
36
+ @dispatcher = @dispatcher_class.new
37
+ Stream.new(@dispatcher, host)
38
+ end
39
+ end
40
+
41
+ # The {Stream} between {Dispatcher} and {Host}.
42
+ class Stream
43
+ attr_reader :id
44
+
45
+ def initialize(dispatcher, host)
46
+ @dispatcher = dispatcher
47
+ @id = @dispatcher.subscribe(host)
48
+ end
49
+
50
+ def close
51
+ @dispatcher.unsubscribe(@id)
52
+ end
53
+
54
+ def error(...)
55
+ @dispatcher.error(...)
56
+ end
57
+
58
+ def send_proto(...)
59
+ @dispatcher.send_proto(...)
60
+ end
61
+ end
62
+
63
+ private_constant :Stream
64
+ end
65
+
66
+ private_constant :Channel
67
+ end
68
+ end
@@ -0,0 +1,89 @@
1
+ # frozen_string_literal: true
2
+
3
+ require 'open3'
4
+
5
+ require_relative '../../../ext/sass/cli'
6
+
7
+ module Sass
8
+ class Compiler
9
+ # The stdio based {Connection} between the {Dispatcher} and the compiler.
10
+ #
11
+ # It runs the `sass --embedded` command.
12
+ class Connection
13
+ def initialize
14
+ @mutex = Mutex.new
15
+ @stdin, @stdout, @stderr, @wait_thread = Open3.popen3(*CLI::COMMAND, '--embedded', chdir: __dir__)
16
+
17
+ @stdin.binmode
18
+
19
+ # # https://dart.dev/tools/dart-devtools
20
+ # if 'dart' == File.basename(CLI::COMMAND.first, '.exe') && CLI::COMMAND.include?('--observe')
21
+ # Kernel.warn(@stdout.readline, uplevel: 0)
22
+ # Kernel.warn(@stdout.readline, uplevel: 0)
23
+ # end
24
+
25
+ @stdout.binmode
26
+
27
+ @wait_thread.name = "sass-embedded-process-waiter-#{id}"
28
+ end
29
+
30
+ def id
31
+ @wait_thread.pid
32
+ end
33
+
34
+ def listen(dispatcher)
35
+ Thread.new do
36
+ Thread.current.name = "sass-embedded-process-stdout-poller-#{id}"
37
+ loop do
38
+ length = Varint.read(@stdout)
39
+ id = Varint.read(@stdout)
40
+ proto = @stdout.read(length - Varint.length(id))
41
+ dispatcher.receive_proto(id, proto)
42
+ end
43
+ rescue IOError, Errno::EBADF, Errno::EPROTO => e
44
+ dispatcher.error(e)
45
+ @mutex.synchronize do
46
+ @stdout.close
47
+ end
48
+ end
49
+
50
+ Thread.new do
51
+ Thread.current.name = "sass-embedded-process-stderr-poller-#{id}"
52
+ loop do
53
+ Kernel.warn(@stderr.readline, uplevel: 0)
54
+ end
55
+ rescue IOError, Errno::EBADF
56
+ @mutex.synchronize do
57
+ @stderr.close
58
+ end
59
+ end
60
+ end
61
+
62
+ def close
63
+ @mutex.synchronize do
64
+ @stdin.close
65
+ @wait_thread.join
66
+ @stdout.close
67
+ @stderr.close
68
+ end
69
+ end
70
+
71
+ def closed?
72
+ @mutex.synchronize do
73
+ @stdin.closed? && !@wait_thread.alive?
74
+ end
75
+ end
76
+
77
+ def write(id, proto)
78
+ buffer = []
79
+ Varint.write(buffer, Varint.length(id) + proto.length)
80
+ Varint.write(buffer, id)
81
+ @mutex.synchronize do
82
+ @stdin.write(buffer.pack('C*'), proto)
83
+ end
84
+ end
85
+ end
86
+
87
+ private_constant :Connection
88
+ end
89
+ end
@@ -0,0 +1,116 @@
1
+ # frozen_string_literal: true
2
+
3
+ module Sass
4
+ class Compiler
5
+ # The {Dispatcher} class.
6
+ #
7
+ # It dispatches messages between multiple instances of {Host} and a single {Connection} to the compiler.
8
+ class Dispatcher
9
+ def initialize
10
+ @id = 1
11
+ @observers = {}.compare_by_identity
12
+ @mutex = Mutex.new
13
+ @connection = Connection.new
14
+ @connection.listen(self)
15
+ ForkTracker.add(self)
16
+ end
17
+
18
+ def subscribe(observer)
19
+ @mutex.synchronize do
20
+ raise Errno::EBUSY if _closed?
21
+
22
+ id = @id
23
+ @id = id.next
24
+ @observers[id] = observer
25
+ id
26
+ end
27
+ end
28
+
29
+ def unsubscribe(id)
30
+ @mutex.synchronize do
31
+ @observers.delete(id)
32
+
33
+ return unless @observers.empty?
34
+
35
+ if _closed?
36
+ Thread.new do
37
+ close
38
+ end
39
+ else
40
+ _idle
41
+ end
42
+ end
43
+ end
44
+
45
+ def close
46
+ @mutex.synchronize do
47
+ _close
48
+ end
49
+ @connection.close
50
+ ForkTracker.delete(self)
51
+ end
52
+
53
+ def closed?
54
+ @connection.closed?
55
+ end
56
+
57
+ def error(error)
58
+ observers = @mutex.synchronize do
59
+ _close
60
+ @observers.values
61
+ end
62
+
63
+ if observers.empty?
64
+ close
65
+ else
66
+ observers.each do |observer|
67
+ observer.error(error)
68
+ end
69
+ end
70
+ end
71
+
72
+ def receive_proto(id, proto)
73
+ case id
74
+ when 1...0xffffffff
75
+ @mutex.synchronize { @observers[id] }&.receive_proto(proto)
76
+ when 0
77
+ outbound_message = EmbeddedProtocol::OutboundMessage.decode(proto)
78
+ oneof = outbound_message.message
79
+ message = outbound_message.public_send(oneof)
80
+ @mutex.synchronize { @observers[message.id] }&.public_send(oneof, message)
81
+ when 0xffffffff
82
+ outbound_message = EmbeddedProtocol::OutboundMessage.decode(proto)
83
+ oneof = outbound_message.message
84
+ message = outbound_message.public_send(oneof)
85
+ raise Errno::EPROTO, message.message
86
+ else
87
+ raise Errno::EPROTO
88
+ end
89
+ end
90
+
91
+ def send_proto(...)
92
+ @connection.write(...)
93
+ end
94
+
95
+ private
96
+
97
+ def _close
98
+ @id = 0xffffffff
99
+ end
100
+
101
+ def _closed?
102
+ @id == 0xffffffff
103
+ end
104
+
105
+ def _idle
106
+ @id = 1
107
+ end
108
+
109
+ def _idle?
110
+ @id == 1
111
+ end
112
+ end
113
+
114
+ private_constant :Dispatcher
115
+ end
116
+ end
@@ -1,7 +1,7 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Sass
4
- class Embedded
4
+ class Compiler
5
5
  class Host
6
6
  # The {FunctionRegistry} class.
7
7
  #
@@ -14,7 +14,6 @@ module Sass
14
14
 
15
15
  @global_functions = functions.keys
16
16
  @functions_by_name = functions.transform_keys do |signature|
17
- signature = signature.chomp
18
17
  index = signature.index('(')
19
18
  if index
20
19
  signature.slice(0, index)
@@ -24,42 +23,49 @@ module Sass
24
23
  end
25
24
 
26
25
  @id = 0
27
- @functions_by_id = {}
28
- @ids_by_function = {}
26
+ @functions_by_id = {}.compare_by_identity
27
+ @ids_by_function = {}.compare_by_identity
29
28
 
30
29
  @highlight = alert_color
31
30
  end
32
31
 
33
32
  def register(function)
34
- return if @ids_by_function.key?(function)
33
+ @ids_by_function.fetch(function) do |fn|
34
+ id = @id
35
+ @id = id.next
35
36
 
36
- id = @id
37
- @id = @id.next
38
-
39
- @ids_by_function[function] = id
40
- @functions_by_id[id] = function
41
-
42
- id
37
+ @functions_by_id[id] = fn
38
+ @ids_by_function[fn] = id
39
+ end
43
40
  end
44
41
 
45
42
  def function_call(function_call_request)
43
+ oneof = function_call_request.identifier
44
+ identifier = function_call_request.public_send(oneof)
45
+ function = case oneof
46
+ when :name
47
+ @functions_by_name[identifier]
48
+ when :function_id
49
+ @functions_by_id[identifier]
50
+ else
51
+ raise ArgumentError, "Unknown FunctionCallRequest.identifier #{identifier}"
52
+ end
53
+
46
54
  arguments = function_call_request.arguments.map do |argument|
47
- value_protofier.from_proto(argument)
55
+ protofier.from_proto(argument)
48
56
  end
49
57
 
50
- success = value_protofier.to_proto(get(function_call_request).call(arguments))
51
- accessed_argument_lists = arguments
52
- .select do |argument|
53
- argument.is_a?(Sass::Value::ArgumentList) && argument.instance_eval do
54
- @keywords_accessed
55
- end
56
- end
57
- .map { |argument| argument.instance_eval { @id } }
58
+ success = protofier.to_proto(function.call(arguments))
59
+ accessed_argument_lists = arguments.filter_map do |argument|
60
+ if argument.is_a?(Sass::Value::ArgumentList) && argument.instance_eval { @keywords_accessed }
61
+ argument.instance_eval { @id }
62
+ end
63
+ end
58
64
 
59
65
  EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
60
66
  id: function_call_request.id,
61
- success: success,
62
- accessed_argument_lists: accessed_argument_lists
67
+ success:,
68
+ accessed_argument_lists:
63
69
  )
64
70
  rescue StandardError => e
65
71
  EmbeddedProtocol::InboundMessage::FunctionCallResponse.new(
@@ -70,17 +76,8 @@ module Sass
70
76
 
71
77
  private
72
78
 
73
- def get(function_call_request)
74
- case function_call_request.identifier
75
- when :name
76
- @functions_by_name[function_call_request.name]
77
- when :function_id
78
- @functions_by_id[function_call_request.function_id]
79
- end
80
- end
81
-
82
- def value_protofier
83
- @value_protofier ||= ValueProtofier.new(self)
79
+ def protofier
80
+ @protofier ||= Protofier.new(self)
84
81
  end
85
82
  end
86
83