summaryrefslogtreecommitdiff
path: root/src/scriptcheck.sml
diff options
context:
space:
mode:
authorGravatar Adam Chlipala <adamc@hcoop.net>2009-09-22 12:23:21 -0400
committerGravatar Adam Chlipala <adamc@hcoop.net>2009-09-22 12:23:21 -0400
commitcd9a791612f456a9ba679b6848cf58f81665ac10 (patch)
treed6335ce5fefb5a16ea33ad1fe8316ea38ae06e22 /src/scriptcheck.sml
parent70423cce32b060fd58212422082fd4f9e89105b0 (diff)
Hopefully complete refactoring of Jscomp to output ASTs; partial implementation of interpreter in runtime system (demo/alert works)
Diffstat (limited to 'src/scriptcheck.sml')
-rw-r--r--src/scriptcheck.sml9
1 files changed, 2 insertions, 7 deletions
diff --git a/src/scriptcheck.sml b/src/scriptcheck.sml
index 09e9e884..c4623fc3 100644
--- a/src/scriptcheck.sml
+++ b/src/scriptcheck.sml
@@ -67,7 +67,7 @@ val events = ["abort",
"unload"]
val scriptWords = "<script"
- :: map (fn s => "on" ^ s ^ " ='") events
+ :: map (fn s => " on" ^ s ^ "='") events
val pushWords = ["rv("]
@@ -75,12 +75,7 @@ fun classify (ds, ps) =
let
val proto = Settings.currentProtocol ()
- fun inString {needle, haystack} =
- let
- val (_, suffix) = Substring.position needle (Substring.full haystack)
- in
- not (Substring.isEmpty suffix)
- end
+ fun inString {needle, haystack} = String.isSubstring needle haystack
fun hasClient {basis, words, onload} csids =
let