Unified symbol-to-docblock server command
[hiphop-php.git] / hphp / hack / src / server / fullFidelityParseService.ml
blobfb5caba55050487d427f903fee3f78d3dad11198
1 (**
2 * Copyright (c) 2016, Facebook, Inc.
3 * All rights reserved.
5 * This source code is licensed under the MIT license found in the
6 * LICENSE file in the "hack" directory of this source tree.
8 *)
10 module SyntaxTree = Full_fidelity_syntax_tree
11 .WithSyntax(Full_fidelity_minimal_syntax)
13 (* Entry Point *)
14 let go filename =
15 let file = Relative_path.create Relative_path.Dummy filename in
16 let source_text = Full_fidelity_source_text.from_file file in
17 let syntax_tree = SyntaxTree.make source_text in
18 let json = SyntaxTree.to_json syntax_tree in
19 Hh_json.json_to_string json