We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Learn more about funding links in repositories.
Report abuse
1 parent 9d970cb commit 614bcffCopy full SHA for 614bcff
lib/opal/parser/lexer.rb
@@ -87,6 +87,10 @@ def check(regexp)
87
@scanner.check regexp
88
end
89
90
+ def pushback(n)
91
+ @scanner.pos -= 1
92
+ end
93
+
94
def matched
95
@scanner.matched
96
@@ -165,7 +169,7 @@ def next_string_token
165
169
if scan Regexp.new(Regexp.escape(str_parse[:end]))
166
170
if words && !str_parse[:done_last_space]#&& space
167
171
str_parse[:done_last_space] = true
168
- scanner.pos -= 1
172
+ pushback(1)
173
return :tSPACE, ' '
174
175
self.strterm = nil
@@ -332,7 +336,7 @@ def add_string_content(str_buffer, str_parse)
332
336
c = scanner.matched
333
337
334
338
elsif words && scan(/\s/)
335
339
340
break
341
342
elsif expand && check(/#(?=[\$\@\{])/)
0 commit comments