Skip to content

Commit

Permalink
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/opal/parser/lexer.rb
Original file line number Diff line number Diff line change
@@ -87,6 +87,10 @@ def check(regexp)
@scanner.check regexp
end

def pushback(n)
@scanner.pos -= 1
end

def matched
@scanner.matched
end
@@ -165,7 +169,7 @@ def next_string_token
if scan Regexp.new(Regexp.escape(str_parse[:end]))
if words && !str_parse[:done_last_space]#&& space
str_parse[:done_last_space] = true
scanner.pos -= 1
pushback(1)
return :tSPACE, ' '
end
self.strterm = nil
@@ -332,7 +336,7 @@ def add_string_content(str_buffer, str_parse)
c = scanner.matched

elsif words && scan(/\s/)
scanner.pos -= 1
pushback(1)
break

elsif expand && check(/#(?=[\$\@\{])/)

0 comments on commit 614bcff

Please sign in to comment.