Permalink
Browse files

[fix] bsljsparse: whitespace regexp.

Tags were being read as ["c"; "p"; "s"] instead of ["cps"].
  • Loading branch information...
1 parent 8a117e7 commit dadc6166a01d6b2a043e77f31d5850d9020108a1 @arthuraa arthuraa committed Aug 28, 2012
Showing with 2 additions and 4 deletions.
  1. +2 −4 compiler/libbsl/bslJsParse.ml
@@ -37,8 +37,6 @@ type parsed_file = {
code: JsAst.code;
}
-let whitespace = Str.regexp "[ \t]*"
-
(** When trying to interpret a comment as a bsl directive, we do the
following:
@@ -78,7 +76,7 @@ let collect_bsl_tags tags =
let strings tag update bsl_tags =
let aux (_, tag', args) =
if tag = tag' then
- let attributes = Str.split whitespace args in
+ let attributes = Str.split (Str.regexp "[ \t]+") args in
Some attributes
else
None
@@ -96,7 +94,7 @@ let collect_bsl_tags tags =
| (_, tag', args) :: rest ->
if tag <> tag' then
aux rest
- else if Str.string_match whitespace args 0 then
+ else if Str.string_match (Str.regexp "[ \t]*") args 0 then
Some (update bsl_tags)
else
None

0 comments on commit dadc616

Please sign in to comment.