summaryrefslogtreecommitdiff
path: root/src/lib.urp
diff options
context:
space:
mode:
authorGravatar Benjamin Barenblat <bbaren@mit.edu>2015-07-30 16:51:31 -0400
committerGravatar Benjamin Barenblat <bbaren@mit.edu>2015-07-30 16:51:31 -0400
commitaa05cf6073cf2a6dfa46108cd5522c0171a7f1c3 (patch)
tree27405b9488362c624788da7278c57afc101a300c /src/lib.urp
parentd6528405184ed3cc2a4f25b8ba86fabbc892dc59 (diff)
Make library work on both client and server sides
Replace the two-step compile/match process with a single compile-and-match one to avoid issues with server-client representation incompatibility. Use the browser regex engine on the client side.
Diffstat (limited to 'src/lib.urp')
-rw-r--r--src/lib.urp6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/lib.urp b/src/lib.urp
index 9f95450..2dff404 100644
--- a/src/lib.urp
+++ b/src/lib.urp
@@ -1,5 +1,11 @@
ffi regex__FFI
include regex__FFI.h
link -lurweb_regex
+jsFunc Regex__FFI.succeeded=UrWeb.Regex.succeeded
+jsFunc Regex__FFI.n_subexpression_matches=UrWeb.Regex.nSubexpressionMatches
+jsFunc Regex__FFI.subexpression_match=UrWeb.Regex.subexpressionMatch
+jsFunc Regex__FFI.do_match=UrWeb.Regex.doMatch
+file /cgGvSqBi.js regex__FFI.js
+script /cgGvSqBi.js
regex \ No newline at end of file