
(* the token list contains also the comment-tokens *)
type program2 = Ast_java.program option * Parser_java.token list

exception Parse_error of Parse_info.info

(* This is the main function *)
val parse : 
  Common.filename (*javafile*) -> (program2 * Parse_info.parsing_stat)

(* may return "just:pb" exn when program2 was a None *)
val parse_program:
  Common.filename -> Ast_java.program

(* for generalized sgrep/spatch patterns *)
val parse_fuzzy:
  Common.filename -> Ast_fuzzy.tree list * Parser_java.token list


(* internal *)
val tokens: Common.filename -> Parser_java.token list
(* useful for unit testing, mock *)
val tmp_file_from_string: string -> Common.filename


(* the token list contains also the comment-tokens *)
type program2 = Ast_java.program option * Parser_java.token list

exception Parse_error of Parse_info.info

(* This is the main function *)
val parse :
  Common.filename (*javafile*) -> (program2 * Parse_info.parsing_stat)

(* may return "just:pb" exn when program2 was a None *)
val parse_program:
  Common.filename -> Ast_java.program

(* for generalized sgrep/spatch patterns *)
val parse_fuzzy:
  Common.filename -> Ast_fuzzy.tree list * Parser_java.token list

val program_of_program2 : program2 -> Ast_java.program

(* internal *)
val tokens: Common.filename -> Parser_java.token list
(* useful for unit testing, mock *)
val tmp_file_from_string: string -> Common.filename

Add program_of_program2 to the interface for Parse_java
Add program_of_program2 to the interface for Parse_java

Summary:
See title.

I need this for the java_clobberer, coming soonish.

Test Plan: make

Reviewers: pad, jiaol

Reviewed By: pad

Differential Revision: https://phabricator.fb.com/D902846
