Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 25 lines (19 sloc) 0.422 kb
3a93fbd syntax extension to support jQuery method chaining
Jake Donham authored
1 open Camlp4
2
3 module Id : Sig.Id =
4 struct
5 let name = "pa_jquery"
6 let version = "0.1"
7 end
8
9 module Make (Syntax : Sig.Camlp4Syntax) =
10 struct
11 open Sig
12 include Syntax
13
14 DELETE_RULE Gram expr: SELF; "#"; label END;
15
16 EXTEND Gram
17 expr: BEFORE "apply"
18 [ "#" LEFTA
19 [ e = SELF; "#"; lab = label -> <:expr< $e$ # $lab$ >> ]
20 ];
21 END
22 end
23
24 let module M = Register.OCamlSyntaxExtension(Id)(Make) in ()
Something went wrong with that request. Please try again.