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: 22d96ad6d8ce
Choose a base ref
...
head repository: opal/opal
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 698f37f317c6
Choose a head ref
  • 2 commits
  • 1 file changed
  • 2 contributors

Commits on Jun 3, 2015

  1. Handle parser errors when lexer column is 0

    Without this, there is an error formatting the exception message
    (ArgumentError: negative argument), and the underlying exception
    is lost.
    jeremyevans committed Jun 3, 2015
    Copy the full SHA
    8bd43ad View commit details
  2. Merge pull request #911 from jeremyevans/lexer-column

    Handle parser errors when lexer column is 0
    elia committed Jun 3, 2015
    Copy the full SHA
    698f37f View commit details
Showing with 1 addition and 1 deletion.
  1. +1 −1 lib/opal/parser.rb
2 changes: 1 addition & 1 deletion lib/opal/parser.rb
Original file line number Diff line number Diff line change
@@ -42,7 +42,7 @@ def parse(source, file = '(string)')
error.message,
"Source: #{@file}:#{lexer.line}:#{lexer.column}",
source.split("\n")[lexer.line-1],
'~'*(lexer.column-1) + '^',
'~'*(lexer.column-1 > 0 ? lexer.column-1 : 0) + '^',
].join("\n")

raise error.class, message, error.backtrace