Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Remove un-needed eos string check for heredocs
  • Loading branch information
adambeynon committed Dec 2, 2013
1 parent 00e283f commit 337de6c
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions lib/opal/parser/lexer.rb
Expand Up @@ -235,8 +235,6 @@ def here_document(str_parse)
end

until check(eos_regx) && scanner.bol?
handled = true

if scanner.eos?
raise "reached EOF while in heredoc"
end
Expand All @@ -248,11 +246,7 @@ def here_document(str_parse)
elsif scan(/\\/)
str_buffer << self.read_escape
else
handled = false
end

unless handled
reg = Regexp.new("[^#{Regexp.escape str_parse[:end]}\#\0\\\\\n]+|.")
reg = Regexp.new("[^\#\0\\\\\n]+|.")

scan reg
str_buffer << scanner.matched
Expand Down

0 comments on commit 337de6c

Please sign in to comment.