Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: opal/opal
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 755e0ba2d564
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7d1f1a7afd2e
Choose a head ref
  • 2 commits
  • 1 file changed
  • 1 contributor

Commits on Nov 22, 2013

  1. Verified

    This commit was signed with the committer’s verified signature.
    lukekarrys Luke Karrys
    Copy the full SHA
    103994b View commit details
  2. Verified

    This commit was signed with the committer’s verified signature.
    lukekarrys Luke Karrys
    Copy the full SHA
    7d1f1a7 View commit details
Showing with 9 additions and 9 deletions.
  1. +9 −9 lib/opal/parser/lexer.rb
18 changes: 9 additions & 9 deletions lib/opal/parser/lexer.rb
Original file line number Diff line number Diff line change
@@ -90,7 +90,7 @@ def scan(regexp)
result
end

def skip_scan(regexp)
def skip(regexp)
@scanner.scan regexp
end

@@ -536,22 +536,22 @@ def yylex
end

while true
if skip_scan(/\ |\t|\r/)
if skip(/\ |\t|\r/)
@space_seen = true
next

elsif skip_scan(/(\n|#)/)
elsif skip(/(\n|#)/)
c = scanner.matched
if c == '#' then skip_scan(/(.*)/) else @line += 1; end
if c == '#' then skip(/(.*)/) else @line += 1; end

skip_scan(/(\n+)/)
skip(/(\n+)/)
@line += scanner.matched.length if scanner.matched

next if [:expr_beg, :expr_dot].include? @lex_state

if skip_scan(/([\ \t\r\f\v]*)\./)
if skip(/([\ \t\r\f\v]*)\./)
@space_seen = true unless scanner[1].empty?
scanner.pos = scanner.pos - 1
pushback(1)

next unless check(/\.\./)
end
@@ -739,11 +739,11 @@ def yylex
return :tSTRING_BEG
when 'W'
self.strterm = new_strterm(:dword, 'W', term)
skip_scan(/\s*/)
skip(/\s*/)
return :tWORDS_BEG
when 'w', 'i'
self.strterm = new_strterm(:sword, 'w', term)
skip_scan(/\s*/)
skip(/\s*/)
return :tAWORDS_BEG
when 'x'
self.strterm = new_strterm2(:xquote, paren, term)