{"action":"created","issue":{"url":"https://api.github.com/repos/opal/opal/issues/1388","repository_url":"https://api.github.com/repos/opal/opal","labels_url":"https://api.github.com/repos/opal/opal/issues/1388/labels{/name}","comments_url":"https://api.github.com/repos/opal/opal/issues/1388/comments","events_url":"https://api.github.com/repos/opal/opal/issues/1388/events","html_url":"https://github.com/opal/opal/issues/1388","id":139659067,"number":1388,"title":"Line continuation mishandling","user":{"login":"aquamme","id":3794475,"avatar_url":"https://avatars.githubusercontent.com/u/3794475?v=3","gravatar_id":"","url":"https://api.github.com/users/aquamme","html_url":"https://github.com/aquamme","followers_url":"https://api.github.com/users/aquamme/followers","following_url":"https://api.github.com/users/aquamme/following{/other_user}","gists_url":"https://api.github.com/users/aquamme/gists{/gist_id}","starred_url":"https://api.github.com/users/aquamme/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aquamme/subscriptions","organizations_url":"https://api.github.com/users/aquamme/orgs","repos_url":"https://api.github.com/users/aquamme/repos","events_url":"https://api.github.com/users/aquamme/events{/privacy}","received_events_url":"https://api.github.com/users/aquamme/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":{"login":"iliabylich","id":1265492,"avatar_url":"https://avatars.githubusercontent.com/u/1265492?v=3","gravatar_id":"","url":"https://api.github.com/users/iliabylich","html_url":"https://github.com/iliabylich","followers_url":"https://api.github.com/users/iliabylich/followers","following_url":"https://api.github.com/users/iliabylich/following{/other_user}","gists_url":"https://api.github.com/users/iliabylich/gists{/gist_id}","starred_url":"https://api.github.com/users/iliabylich/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/iliabylich/subscriptions","organizations_url":"https://api.github.com/users/iliabylich/orgs","repos_url":"https://api.github.com/users/iliabylich/repos","events_url":"https://api.github.com/users/iliabylich/events{/privacy}","received_events_url":"https://api.github.com/users/iliabylich/received_events","type":"User","site_admin":false},"milestone":null,"comments":2,"created_at":"2016-03-09T18:18:17Z","updated_at":"2016-03-10T11:50:34Z","closed_at":null,"body":"There appears to be at least one case where a line continuation isn't handled correctly by Opal. Attempting to execute the compiled output of [this method](https://github.com/nofxx/georuby/blob/v2.5.2/lib/geo_ruby/simple_features/point.rb#L422-L432) causes an error to be thrown.\r\n\r\nThe compiled method:\r\n```javascript\r\nOpal.defs(self, '$from_latlong', function(lat, lon, srid) {\r\n  var $a, $b, TMP_3, self = this, p = nil, point = nil;\r\n\r\n  if (srid == null) {\r\n    srid = $scope.get('DEFAULT_SRID')\r\n  }\r\n  p = ($a = ($b = [lat, lon]).$map, $a.$$p = (TMP_3 = function(l){var self = TMP_3.$$s || this, $a, $b, sig = nil, deg = nil, min = nil, sec = nil, cen = nil, dec = nil;\r\n null) l = nil;\r\n  $b = self.$\\\r\nn(/(-)?(\\d{1,2})\\D*(\\d{2})\\D*(\\d{2})(\\D*(\\d{1,3}))?/).$flatten(), $a = Opal.to_ary($b), sig = ($a[0] == null ? nil : $a[0]), deg = ($a[1] == null ? nil : $a[1]), min = ($a[2] == null ? nil : $a[2]), sec = ($a[3] == null ? nil : $a[3]), cen = ($a[4] == null ? nil : $a[4]), $b;\r\n    if ((($a = l['$=~'](/W|S/)) !== nil && (!$a.$$is_boolean || $a == true))) {\r\n      sig = true};\r\n    dec = $rb_plus(deg.$to_i(), $rb_divide(($rb_plus($rb_times(min.$to_i(), 60), (((\"\") + (sec)) + (cen)).$to_f())), 3600));\r\n    if (sig !== false && sig !== nil) {\r\n      return $rb_times(dec, -1)\r\n      } else {\r\n      return dec\r\n    };}, TMP_3.$$s = self, TMP_3), $a).call($b);\r\n  point = self.$new(srid);\r\n  return point.$set_x_y(p['$[]'](0), p['$[]'](1));\r\n});\r\n```\r\n\r\nSpecifically, this line: `$b = self.$\\`"},"comment":{"url":"https://api.github.com/repos/opal/opal/issues/comments/194810089","html_url":"https://github.com/opal/opal/issues/1388#issuecomment-194810089","issue_url":"https://api.github.com/repos/opal/opal/issues/1388","id":194810089,"user":{"login":"elia","id":1051,"avatar_url":"https://avatars.githubusercontent.com/u/1051?v=3","gravatar_id":"","url":"https://api.github.com/users/elia","html_url":"https://github.com/elia","followers_url":"https://api.github.com/users/elia/followers","following_url":"https://api.github.com/users/elia/following{/other_user}","gists_url":"https://api.github.com/users/elia/gists{/gist_id}","starred_url":"https://api.github.com/users/elia/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/elia/subscriptions","organizations_url":"https://api.github.com/users/elia/orgs","repos_url":"https://api.github.com/users/elia/repos","events_url":"https://api.github.com/users/elia/events{/privacy}","received_events_url":"https://api.github.com/users/elia/received_events","type":"User","site_admin":false},"created_at":"2016-03-10T11:50:34Z","updated_at":"2016-03-10T11:50:34Z","body":"or even:\r\n\r\n```rb\r\na = \\\r\nb\r\n```\r\n"}}