-
Notifications
You must be signed in to change notification settings - Fork 14
Open
Description
$ dune.build
File "frontc/cxml.ml", line 43, characters 19-20:
Error: Syntax error
This is because of this code bit:
Lines 42 to 59 in c95d785
let validate_identifiers toplevel = | |
let open Set.Make(String) in | |
let rec node ids x ~accept ~reject = match x with | |
| TEXT _ | COM _ | PI _ -> accept ids | |
| ELT (_,attrs,xs) as elt -> | |
match List.assoc_opt "id" attrs with | |
| None -> nodes ids xs ~accept ~reject | |
| Some "" -> reject elt | |
| Some id -> if mem id ids | |
then reject elt | |
else nodes (add id ids) xs ~reject ~accept | |
and nodes ids xs ~accept ~reject = match xs with | |
| [] -> accept ids | |
| x :: xs -> node ids x ~reject ~accept:(fun ids -> | |
nodes ids xs ~accept ~reject) in | |
node empty toplevel | |
~accept:(fun _ -> Ok toplevel) | |
~reject:(fun elt -> Error elt) |
Metadata
Metadata
Assignees
Labels
No labels