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 +4 -4
- data/CHANGELOG.md +4 -0
- data/lib/sirop/sourcifier.rb +4 -4
- data/lib/sirop/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4d475eb4c57f828b193d42ae84700166e27b3a75dea70b45e5db06ed794c0bfc
|
4
|
+
data.tar.gz: 9e3862c38a622de3b2201793b3ce46926992c6293ccc6d08d06c0e92d86cfa4f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 9483256cc41c894eb859dabeb48d3156b6b7debb15a24e0179da4c11807910ca474754a58d87270ea862861b7c2e21bf479ff3e591597f78ff6ec47586f8fa5a
|
7
|
+
data.tar.gz: 31cfc2c1bc8f4159b365479ddb02a92f545d33ffc89b506040c72927bd565326fde580d9fef625c4ab25a5309ba4c09090c5a677ce1ea642200f4f0dcf6bcea9
|
data/CHANGELOG.md
CHANGED
data/lib/sirop/sourcifier.rb
CHANGED
@@ -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