I'm trying to use Opal to convert ruby code to javascript. At first, it looked pretty promising, but it just doesn't work with my class. I get the below error which does not make sense to me:
SyntaxError: An error occurred while compiling: (file)
unexpected '"kEND"'
Source: (file):1:7718
Here is the gist link to the ruby file I'm trying to convert to javascript: query_builder.rb
This compiles in my ruby interpreter just fine. I'm not sure if opal is using an incompatible version of ruby or what the deal is. But my code is pretty standard ruby. Any help would be greatly appreciated. Thank you in advance.
The linked code uses hard tabs instead of the usual two spaces for indententation. According to this GitHub issue tabs seem to be an issue for Opal. So replace them with your favorite text editor and it'll compile.