sirop 0.8.3 → 0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 5d626e8c25209085b021149621145861b6bf871246c60b5a845d53afc1cc92ee
4
- data.tar.gz: 414de510672f1f5dcb7d3b9d5deadf6ba9c507eeca7c499bb7c7f70038fbd4a8
3
+ metadata.gz: 4d475eb4c57f828b193d42ae84700166e27b3a75dea70b45e5db06ed794c0bfc
4
+ data.tar.gz: 9e3862c38a622de3b2201793b3ce46926992c6293ccc6d08d06c0e92d86cfa4f
5
5
  SHA512:
6
- metadata.gz: dcf3ac4365b06e6b64671b8b72722b4905f114f289498bc2b2b78824b1903ff9e48b5cf89a77b009424676f7ddb7326f73443a7813fec7d45de751d58ceac7ec
7
- data.tar.gz: 5b44ac736d2c3e527bfb5912a788ad330af99f4648869a396977a3add8ce360ec1f58536b0a493eace402c800cafe777277e7e8de3779175ec1fab9fb4a3384d
6
+ metadata.gz: 9483256cc41c894eb859dabeb48d3156b6b7debb15a24e0179da4c11807910ca474754a58d87270ea862861b7c2e21bf479ff3e591597f78ff6ec47586f8fa5a
7
+ data.tar.gz: 31cfc2c1bc8f4159b365479ddb02a92f545d33ffc89b506040c72927bd565326fde580d9fef625c4ab25a5309ba4c09090c5a677ce1ea642200f4f0dcf6bcea9
data/CHANGELOG.md CHANGED
@@ -1,3 +1,7 @@
1
+ # 0.9 2025-08-17
2
+
3
+ - Add advance_to_end option to `Sourcifier#adjust_whitespace`
4
+
1
5
  # 0.8.3 2025-08-08
2
6
 
3
7
  - Add support for `it`
@@ -122,11 +122,11 @@ module Sirop
122
122
  end
123
123
 
124
124
  def emit(str)
125
- update_source_map
125
+ update_source_map(str)
126
126
  @buffer << str
127
127
  end
128
128
 
129
- def update_source_map
129
+ def update_source_map(str = nil)
130
130
  return if !@source_map
131
131
 
132
132
  buffer_cur_line = @buffer.count("\n") + 1
@@ -134,7 +134,7 @@ module Sirop
134
134
  @source_map[buffer_cur_line + @source_map_line_ofs] ||= orig_source_cur_line
135
135
  end
136
136
 
137
- def adjust_whitespace(loc)
137
+ def adjust_whitespace(loc, advance_to_end: true)
138
138
  return if loc.is_a?(Sirop::Injection)
139
139
 
140
140
  if @last_loc_start
@@ -154,7 +154,7 @@ module Sirop
154
154
  end
155
155
  @last_loc = loc
156
156
  @last_loc_start = loc_start(loc)
157
- @last_loc_end = loc_end(loc)
157
+ @last_loc_end = advance_to_end ? loc_end(loc) : @last_loc_start
158
158
  end
159
159
 
160
160
  def emit_code(loc, semicolon: false, chomp: false)
data/lib/sirop/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  module Sirop
2
2
  # Sirop version
3
- VERSION = '0.8.3'
3
+ VERSION = '0.9'
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: sirop
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.8.3
4
+ version: '0.9'
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sharon Rosner