-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[flow] tidy up syntactic flags in statement.ml
Summary: Groups together flags that capture properties of the syntactic context of an expression. Changelog: [internal] Reviewed By: SamChou19815 Differential Revision: D70676104 fbshipit-source-id: 4476f1849723ad9f5fd76a1872ff45c7fe85e3db
- Loading branch information
1 parent
b7a02fa
commit 9e5410a
Showing
7 changed files
with
138 additions
and
59 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
(* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*) | ||
|
||
module Ast = Flow_ast | ||
|
||
type syntactic_flags = { | ||
cond: Type.cond_context option; | ||
decl: Ast.Variable.kind option; | ||
as_const: bool; | ||
frozen: Type.frozen_kind; | ||
} | ||
|
||
let empty_syntactic_flags = { cond = None; decl = None; as_const = false; frozen = Type.NotFrozen } | ||
|
||
let mk_syntactic_flags ?cond ?decl ?(as_const = false) ?(frozen = Type.NotFrozen) () = | ||
{ cond; decl; as_const; frozen } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
(* | ||
* Copyright (c) Meta Platforms, Inc. and affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*) | ||
|
||
module Ast = Flow_ast | ||
|
||
type syntactic_flags = { | ||
cond: Type.cond_context option; | ||
decl: Ast.Variable.kind option; | ||
as_const: bool; | ||
frozen: Type.frozen_kind; | ||
} | ||
|
||
val empty_syntactic_flags : syntactic_flags | ||
|
||
val mk_syntactic_flags : | ||
?cond:Type.cond_context -> | ||
?decl:Ast.Variable.kind -> | ||
?as_const:bool -> | ||
?frozen:Type.frozen_kind -> | ||
unit -> | ||
syntactic_flags |
Oops, something went wrong.