Commit 0242804d authored by Pietro Abate's avatar Pietro Abate

[r2003-05-26 22:36:48 by cvscast] Cosmetique

Original author: cvscast
Date: 2003-05-26 22:36:48+00:00
parent e5d09cb3
let symbols = ref []
let define s =
try
let i = String.index s '=' in
let i =
try String.index s '='
with Not_found -> failwith ("Invalid symbol definition :" ^ s) in
symbols :=
(String.sub s 0 i, String.sub s (i + 1) (String.length s - i - 1)) ::
!symbols
with Not_found ->
failwith ("Invalid symbol definition :" ^ s)
let expr _ s =
try List.assoc s !symbols
with Not_found ->
failwith ("No definition for symbol " ^ s)
with Not_found -> failwith ("No definition for symbol " ^ s)
let _ =
Quotation.add "symbol" (Quotation.ExStr expr);
......
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