From 5ee51dcd83cba0c90328d80376bef612b94f1700 Mon Sep 17 00:00:00 2001 From: Adam Chlipala Date: Tue, 22 Sep 2009 13:27:47 -0400 Subject: Functions working with interpretation --- src/c/urweb.c | 4 ++-- tests/jscomp.ur | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/src/c/urweb.c b/src/c/urweb.c index 855841e1..88e9569d 100644 --- a/src/c/urweb.c +++ b/src/c/urweb.c @@ -1292,7 +1292,7 @@ uw_Basis_int uw_Basis_new_client_source(uw_context ctx, uw_Basis_string s) { strcpy(ctx->script.front, s); ctx->script.front += s_len; strcpy(ctx->script.front, "));"); - ctx->script.front += 2; + ctx->script.front += 3; return ctx->source_count++; } @@ -1307,7 +1307,7 @@ uw_unit uw_Basis_set_client_source(uw_context ctx, uw_Basis_int n, uw_Basis_stri strcpy(ctx->script.front, s); ctx->script.front += s_len; strcpy(ctx->script.front, "));"); - ctx->script.front += 2; + ctx->script.front += 3; return uw_unit_v; } diff --git a/tests/jscomp.ur b/tests/jscomp.ur index a11c0088..7722166f 100644 --- a/tests/jscomp.ur +++ b/tests/jscomp.ur @@ -1,10 +1,15 @@ fun main () = s <- source ""; + f <- source (plus 1); return -
+

+ + Function: