Show position information on the ast on demand
commitff238266e89b175326d14ea406fdaa2b78d404dc
authorOguz Ulgen <oulgen@fb.com>
Mon, 22 Jan 2018 23:02:22 +0000 (22 15:02 -0800)
committerHhvm Bot <hhvm-bot@users.noreply.github.com>
Mon, 22 Jan 2018 23:20:37 +0000 (22 15:20 -0800)
treed8e2b10362f483e9a5484360ecfb103549f5573c
parent731d2113153aadef68eb31a1ad0bb9fb77146371
Show position information on the ast on demand

Summary:
Show position information on the AST

Enabled:
```
(AProgram
 ((Stmt (<1:1,1:5> (Markup (<1:1,1:5> "") ())))
  (Constant
   ((cst_mode: Mdecl) (cst_kind: Define) (cst_name: (<4:3,4:5> "\\A"))
    (cst_type: ()) (cst_value: (<5:3,5:5> (Int (<5:3,5:5> 555))))
    (cst_namespace:
     ((ns_name: "") (ns_ns_uses: (SMap ())) (ns_class_uses: (SMap ()))
      (ns_fun_uses: (SMap ())) (ns_const_uses: (SMap ()))))))))%
```
Disabled
```
~/fbcode ❯❯❯ hh_single_parse --parser ffp ~/test.php
(AProgram
 ((Stmt (p (Markup (p "") ())))
  (Constant
   ((cst_mode: Mdecl) (cst_kind: Define) (cst_name: (p "\\A")) (cst_type: ())
    (cst_value: (p (Int (p 555))))
    (cst_namespace:
     ((ns_name: "") (ns_ns_uses: (SMap ())) (ns_class_uses: (SMap ()))
```

Reviewed By: vladima

Differential Revision: D6777589

fbshipit-source-id: c856c338e4dad1eb19fe3a3c60c328668c6d2f2d
hphp/hack/src/hh_single_parse.ml