rufoa / named-re

Named capturing group support for clojure regular expressions
22 stars 1 forks source link

named group can not be used in clojurescript? #1

Closed junjiemars closed 9 years ago

junjiemars commented 9 years ago

env: Javac version 1.8; ClojureScript 0.0-2665; Clojure 1.6

I'd got syntax error in Chrome extension:

owl.web.popup.make_proxy_settings_1_BANG_ = function make_proxy_settings_1_BANG_(uri) {
  var re = /(?<scheme>\w+):\/\/(?<host>[\w\.]+)(:(?<port>\d+))?(\/(?<pac>\w+\.\w+))?/;
  var u = cljs.core.re_find.call(null, re, uri);
  var s = cljs.core.truth_((new cljs.core.Keyword(null, "pac", "pac", 1420264434)).cljs$core$IFn$_invoke$arity$1(u)) ? cljs.core.assoc_in.call(null, cljs.core.deref.call(null, owl.web.popup.proxy_settings), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "value", "value", 305978217)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "mode", "mode", 654403691), "pac_script", new cljs.core.Keyword(null, "pacScript", 
  "pacScript", -2139126047), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "url", "url", 276297046), (new cljs.core.Keyword(null, "0", "0", 351625802)).cljs$core$IFn$_invoke$arity$1(u), new cljs.core.Keyword(null, "mandatory", "mandatory", 542802336), true], null)], null)) : cljs.core.assoc_in.call(null, cljs.core.deref.call(null, owl.web.popup.proxy_settings), new cljs.core.PersistentVector(null, 1, 5, cljs.core.PersistentVector.EMPTY_NODE, [new cljs.core.Keyword(null, "value", 
  "value", 305978217)], null), new cljs.core.PersistentArrayMap(null, 2, [new cljs.core.Keyword(null, "mode", "mode", 654403691), "fixed_servers", new cljs.core.Keyword(null, "rules", "rules", 1198912366), new cljs.core.PersistentArrayMap(null, 1, [new cljs.core.Keyword(null, "singleProxy", "singleProxy", -229698976), new cljs.core.PersistentArrayMap(null, 3, [new cljs.core.Keyword(null, "scheme", "scheme", 90199613), (new cljs.core.Keyword(null, "scheme", "scheme", 90199613)).cljs$core$IFn$_invoke$arity$1(u), 
  new cljs.core.Keyword(null, "host", "host", -1558485167), (new cljs.core.Keyword(null, "host", "host", -1558485167)).cljs$core$IFn$_invoke$arity$1(u), new cljs.core.Keyword(null, "port", "port", 1534937262), (new cljs.core.Keyword(null, "port", "port", 1534937262)).cljs$core$IFn$_invoke$arity$1(u)], null)], null)], null));
  return cljs.core.reset_BANG_.call(null, owl.web.popup.proxy_settings, s);
};
rufoa commented 9 years ago

Sorry, JVM only

junjiemars commented 9 years ago

ok, I'd used position-based groups indeed.