package pfff

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Source file ast_lisp.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
(* Yoann Padioleau
 * 
 * Copyright (C) 2014 Facebook
 *
 * This program is free software; you can redistribute it and/or
 * modify it under the terms of the GNU General Public License (GPL)
 * version 2 as published by the Free Software Foundation.
 * 
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * file license.txt for more details.
 *)

(*****************************************************************************)
(* Prelude *)
(*****************************************************************************)

(*****************************************************************************)
(* The AST types *)
(*****************************************************************************)

(* ------------------------------------------------------------------------- *)
(* Token/info *)
(* ------------------------------------------------------------------------- *)

type info = Parse_info.t
type tok = info

type 'a wrap = 'a * tok
type 'a paren   = tok * 'a * tok

(* ------------------------------------------------------------------------- *)
(* Sexp *)
(* ------------------------------------------------------------------------- *)

type sexp =
  | Sexp of sexp list paren (* or backet actually *)
  | Atom of atom
  | Special of special wrap * sexp

and special =
  | Quote
  | BackQuote
  | Comma
  | At

and atom = 
  | Number of string wrap
  | String of string wrap
  | Id of string wrap

(* with tarzan *)

type program = sexp list

OCaml

Innovation. Community. Security.