Commit 58cf790b authored by Pietro Abate's avatar Pietro Abate
Browse files

[r2005-03-23 15:10:34 by afrisch] Empty log message

Original author: afrisch
Date: 2005-03-23 15:10:34+00:00
parent 25342609
......@@ -251,7 +251,7 @@ and eval_transform_aux env brs acc = function
| x -> eval_transform_aux env brs (append_cdr acc x) y)
| Value.String_latin1 (_,_,_,q) | Value.String_utf8 (_,_,_,q) as v ->
if not brs.brs_accept_chars
then eval_transform_aux env brs acc v
then eval_transform_aux env brs acc q
else eval_transform_aux env brs acc (normalize v)
| Value.Concat (x,y) ->
let acc = eval_transform_aux env brs acc x in
......
......@@ -698,3 +698,10 @@ let mk_record labels fields =
done;
Record (LabelMap.from_list_disj !l)
let rec transform_aux f accu = function
| Pair (x,y) -> let accu = Concat (accu, f x) in transform_aux f accu y
| Atom _ -> accu
| v -> transform_aux f accu (normalize v)
let transform f v = transform_aux f nil v
......@@ -134,3 +134,5 @@ val add: t -> t -> t
val pair: t -> t -> t
val xml: t -> t -> t -> t
val mk_record: (U.t * U.t) array -> t array -> t
val transform: (t -> t) -> t -> t
......@@ -619,7 +619,7 @@ let rec constant = function
| Atom a -> atom (Atoms.atom a)
| Char c -> char (Chars.atom c)
| Pair (x,y) -> times (const_node x) (const_node y)
| Xml (x,y) -> times (const_node x) (const_node y)
| Xml (x,y) -> xml (const_node x) (const_node y)
| Record x -> record' (false ,LabelMap.map const_node x)
| String (i,j,s,c) ->
if U.equal_index i j then constant c
......
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