forked from Aliucord/hermes
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Summary: Pass along the name of the field the Node is from throughout visiting the AST. If the user is manually visiting any children, the correct field must be passed along as well. Reviewed By: tmikov Differential Revision: D32339610 fbshipit-source-id: e207c804b8b694ad0134ca5e5423d8d8ad7edcf0
- Loading branch information
1 parent
42ae0e9
commit bc63f9b
Showing
11 changed files
with
873 additions
and
402 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,131 @@ | ||
/* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/// The name of the field of an AST node. | ||
#[derive(Debug, Copy, Clone, PartialEq)] | ||
#[allow(non_camel_case_types)] | ||
pub enum NodeField { | ||
accessibility, | ||
alternate, | ||
argument, | ||
arguments, | ||
assertions, | ||
attributes, | ||
block, | ||
body, | ||
bound, | ||
call_properties, | ||
callee, | ||
cases, | ||
check_type, | ||
children, | ||
closing_element, | ||
closing_fragment, | ||
computed, | ||
consequent, | ||
constraint, | ||
cooked, | ||
declaration, | ||
declarations, | ||
declare, | ||
decorators, | ||
default, | ||
delegate, | ||
directive, | ||
discriminant, | ||
element_type, | ||
element_types, | ||
elements, | ||
exact, | ||
explicit_type, | ||
export, | ||
export_kind, | ||
exported, | ||
expr_name, | ||
expression, | ||
expressions, | ||
extends, | ||
extends_type, | ||
false_t_ype, | ||
finalizer, | ||
flags, | ||
generator, | ||
handler, | ||
has_unknown_members, | ||
id, | ||
implements, | ||
impltype, | ||
import_kind, | ||
imported, | ||
index_type, | ||
indexers, | ||
inexact, | ||
init, | ||
initializer, | ||
internal_slots, | ||
is_async, | ||
is_await, | ||
is_static, | ||
key, | ||
kind, | ||
label, | ||
left, | ||
literal, | ||
local, | ||
members, | ||
meta, | ||
method, | ||
mixins, | ||
name, | ||
namespace, | ||
object, | ||
object_type, | ||
opening_element, | ||
opening_fragment, | ||
operator, | ||
optional, | ||
param, | ||
parameter, | ||
parameter_name, | ||
parameters, | ||
params, | ||
pattern, | ||
predicate, | ||
prefix, | ||
properties, | ||
property, | ||
proto, | ||
qualification, | ||
quasi, | ||
quasis, | ||
raw, | ||
readonly, | ||
rest, | ||
return_type, | ||
right, | ||
self_closing, | ||
shorthand, | ||
source, | ||
specifiers, | ||
super_class, | ||
super_type_parameters, | ||
supertype, | ||
tag, | ||
tail, | ||
test, | ||
this, | ||
trailing_comma, | ||
true_type, | ||
type_annotation, | ||
type_arguments, | ||
type_name, | ||
type_parameters, | ||
types, | ||
update, | ||
value, | ||
variance, | ||
} |
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
Oops, something went wrong.