Skip to content

Commit

Permalink
[flow] Enable component syntax by default in flow ast command
Browse files Browse the repository at this point in the history
Summary: Changelog: [misc] By default, `flow ast` will now parse component syntax rather than reject it. You can pass `--no-component-syntax` to get the old behavior

Reviewed By: alexmckenley

Differential Revision: D56501290

fbshipit-source-id: 23978926a7dbeea2c39a731dfbd31c8293c1155a
  • Loading branch information
SamChou19815 authored and facebook-github-bot committed Apr 24, 2024
1 parent f792887 commit 647f62a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/commands/astCommand.ml
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ let spec =
~doc:"Type of input file (js or json)"
|> flag "--strict" truthy ~doc:"Parse in strict mode"
|> flag "--no-enums" truthy ~doc:"Disable enum support"
|> flag "--component_syntax" truthy ~doc:"Enable support for component syntax"
|> flag "--no-component-syntax" truthy ~doc:"Disable support for component syntax"
|> flag
"--include-comments"
(required
Expand Down Expand Up @@ -97,7 +97,7 @@ let main
file_type_opt
use_strict
no_enums
component_syntax
no_component_syntax
include_comments
include_locs
offset_style
Expand Down Expand Up @@ -152,7 +152,7 @@ let main
let parse_options =
Some
{
Parser_env.components = component_syntax;
Parser_env.components = not no_component_syntax;
enums = not no_enums;
esproposal_decorators = true;
types = true;
Expand Down

0 comments on commit 647f62a

Please sign in to comment.