File: parse_js.mli

package info (click to toggle)
js-of-ocaml 2.2-2
  • links: PTS, VCS
  • area: main
  • in suites: jessie, jessie-kfreebsd
  • size: 7,612 kB
  • ctags: 10,589
  • sloc: ml: 36,459; makefile: 665; lisp: 41; sh: 14; ruby: 4; perl: 4
file content (38 lines) | stat: -rw-r--r-- 1,480 bytes parent folder | download | duplicates (2)
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

(* Js_of_ocaml compiler
 * http://www.ocsigen.org/js_of_ocaml/
 * Copyright (C) 2013 Hugo Heuzard
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License as published by
 * the Free Software Foundation, with linking exception;
 * either version 2.1 of the License, or (at your option) any later version.
 *
 * 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
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
 *)



type lexer

exception Parsing_error of Parse_info.t

val strip_comment : lexer -> lexer

val lexer_from_file : ?rm_comment:bool -> string -> lexer
val lexer_from_string : ?rm_comment:bool -> string -> lexer
val lexer_from_channel : ?rm_comment:bool -> in_channel -> lexer
val lexer_map : (Js_token.token -> Js_token.token) -> lexer -> lexer
val lexer_fold : ('a -> Js_token.token -> 'a) -> 'a -> lexer -> 'a
val lexer_filter : (Js_token.token -> bool) -> lexer -> lexer
val lexer_from_list : Js_token.token list -> lexer

val parse : lexer -> Javascript.program
val parse_expr : lexer -> Javascript.expression