/[svn]/runtime/eval.ml
ViewVC logotype

Diff of /runtime/eval.ml

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 838 by abate, Tue Jul 10 18:06:25 2007 UTC revision 863 by abate, Tue Jul 10 18:07:57 2007 UTC
# Line 69  Line 69 
69        match Schema_common.get_component kind name schema with        match Schema_common.get_component kind name schema with
70        | Schema_types.Type x -> Schema_validator.validate_type x schema        | Schema_types.Type x -> Schema_validator.validate_type x schema
71        | Schema_types.Element x -> Schema_validator.validate_element x schema        | Schema_types.Element x -> Schema_validator.validate_element x schema
72        | Schema_types.Attribute x -> Schema_validator.validate_attribute x schema        | Schema_types.Attribute x ->
73              assert false  (* TODO see schema/schema_validator.mli *)
74    (*           Schema_validator.validate_attribute x schema *)
75        | Schema_types.Attribute_group x ->        | Schema_types.Attribute_group x ->
76            Schema_validator.validate_attribute_group x schema            Schema_validator.validate_attribute_group x schema
77        | Schema_types.Model_group x ->        | Schema_types.Model_group x ->
# Line 280  Line 282 
282    
283  *)  *)
284    
   
   
285  (* Evaluator for "compiled" expressions *)  (* Evaluator for "compiled" expressions *)
286    
287    
# Line 449  Line 449 
449    Value.Record (Builtin_defs.mk_ref ~get ~set)    Value.Record (Builtin_defs.mk_ref ~get ~set)
450    
451  and eval_validate env e kind schema_name name =  and eval_validate env e kind schema_name name =
452    raise (CDuceExn (string_latin1    let schema = Typer.get_schema schema_name in
453      "validate: not implemented for compiled expressions"))    try
454        let validate =
455          match Schema_common.get_component kind name schema with
456          | Schema_types.Type x -> Schema_validator.validate_type x schema
457          | Schema_types.Element x -> Schema_validator.validate_element x schema
458          | Schema_types.Attribute x ->
459              assert false  (* TODO see schema/schema_validator.mli *)
460    (*           Schema_validator.validate_attribute x schema *)
461          | Schema_types.Attribute_group x ->
462              Schema_validator.validate_attribute_group x schema
463          | Schema_types.Model_group x ->
464              Schema_validator.validate_model_group x schema
465        in
466        validate (eval env e)
467      with Schema_common.XSI_validation_error msg ->
468        failwith' ("Schema validation failure: " ^ msg)
469    
470  and eval_try env arg brs =  and eval_try env arg brs =
471    let saved_frame = !frame and saved_sp = !sp in    let saved_frame = !frame and saved_sp = !sp in

Legend:
Removed from v.838  
changed lines
  Added in v.863

CVS Admin">CVS Admin
ViewVC Help
Powered by ViewVC 1.1.5