Summary: There was a lot of indirection going on in `Typ.Name` type definition. Inline all those indirections into single variant type Reviewed By: jberdine Differential Revision: D4737644 fbshipit-source-id: c5e181bmaster
parent
c5d7762f60
commit
9a07318ab7
@ -1,37 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
open! IStd;
|
||||
|
||||
|
||||
/** Internal representation of data structure for Java, Objective-C and C++ classes,
|
||||
C-style structs struct and union,
|
||||
And Objective C protocol */
|
||||
type class_kind =
|
||||
| CPP
|
||||
| Java
|
||||
| Objc
|
||||
[@@deriving compare];
|
||||
|
||||
let equal_class_kind = [%compare.equal : class_kind];
|
||||
|
||||
type t =
|
||||
| Class class_kind
|
||||
| Struct
|
||||
| Union
|
||||
| Protocol
|
||||
[@@deriving compare];
|
||||
|
||||
let name =
|
||||
fun
|
||||
| Class _ => "class"
|
||||
| Struct => "struct"
|
||||
| Union => "union"
|
||||
| Protocol => "protocol";
|
||||
|
||||
let equal = [%compare.equal : t];
|
@ -1,32 +0,0 @@
|
||||
/*
|
||||
* Copyright (c) 2015 - present Facebook, Inc.
|
||||
* All rights reserved.
|
||||
*
|
||||
* This source code is licensed under the BSD style license found in the
|
||||
* LICENSE file in the root directory of this source tree. An additional grant
|
||||
* of patent rights can be found in the PATENTS file in the same directory.
|
||||
*/
|
||||
open! IStd;
|
||||
|
||||
|
||||
/** Internal representation of data structure for Java, Objective-C and C++ classes,
|
||||
C-style structs struct and union,
|
||||
And Objective C protocol */
|
||||
type class_kind =
|
||||
| CPP
|
||||
| Java
|
||||
| Objc
|
||||
[@@deriving compare];
|
||||
|
||||
let equal_class_kind: class_kind => class_kind => bool;
|
||||
|
||||
type t =
|
||||
| Class class_kind
|
||||
| Struct
|
||||
| Union
|
||||
| Protocol
|
||||
[@@deriving compare];
|
||||
|
||||
let equal: t => t => bool;
|
||||
|
||||
let name: t => string;
|
Loading…
Reference in new issue