Commit 0f041fd9 authored by Peter Achten's avatar Peter Achten Committed by Camil Staps

Merge branch 'master' of...

Merge branch 'master' of https://gitlab.science.ru.nl/clean-and-itasks/iTasks-SDK into server-and-client-side-svg-rendering

This is a squashed commit; the individual commit messages (excluding merges) were:
- fixed imports
- compiles again, now need to resolve linker-errors
- fix merge problems and imports
- removed two trace statements
parent adef761c
......@@ -24,12 +24,9 @@ Start world
:: Toggles = {value_in_sds :: Int, update_a_locally :: Bool, update_b_locally :: Bool}
derive class iTask Toggles
derive JSEncode Toggles
derive JSDecode Toggles
:: Who = A | B
derive class iTask Who
derive JSEncode Who
toggleOf :: Who Toggles -> Bool
toggleOf A t = t.Toggles.update_a_locally
......
......@@ -168,8 +168,8 @@ where
# c = toInt c
# dest = {dest & [di]='\\', [di+1]='x', [di+2]=hex (c>>4), [di+3]=hex (c bitand 0x0f)}
= copy_and_escape src (si+1) dest (di+4)
| c == '\''
# dest = {dest & [di]='\\', [di+1]='\''}
| c == '\'' || c == '\\'
# dest = {dest & [di]='\\', [di+1]=c}
= copy_and_escape src (si+1) dest (di+2)
| otherwise
# dest = {dest & [di]=c}
......@@ -193,9 +193,11 @@ where
escaped_size :: !String !Int !Int -> Int
escaped_size s -1 n = n
escaped_size s i n
| s.[i] < '\x20' = escaped_size s (i-1) (n+4)
| s.[i] == '\'' = escaped_size s (i-1) (n+2)
| otherwise = escaped_size s (i-1) (n+1)
| s.[i] < '\x20'
= escaped_size s (i-1) (n+4)
| s.[i] == '\'' || s.[i] == '\\'
= escaped_size s (i-1) (n+2)
= escaped_size s (i-1) (n+1)
JSReal r -> size (toString r) + l
JSVar v -> size v + l
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment