Ruby: put AST node locations in a single table

This commit is contained in:
Nick Rolfe
2022-02-01 17:15:36 +00:00
parent 55e69d421c
commit 388d361ec3
6 changed files with 341 additions and 822 deletions

View File

@@ -402,11 +402,12 @@ impl Visitor<'_> {
match &table.kind { match &table.kind {
EntryKind::Token { kind_id, .. } => { EntryKind::Token { kind_id, .. } => {
self.trap_writer.add_tuple( self.trap_writer.add_tuple(
&format!("{}_ast_node_parent", self.language_prefix), &format!("{}_ast_node_info", self.language_prefix),
vec![ vec![
Arg::Label(id), Arg::Label(id),
Arg::Label(parent_id), Arg::Label(parent_id),
Arg::Int(parent_index), Arg::Int(parent_index),
Arg::Label(loc),
], ],
); );
self.trap_writer.add_tuple( self.trap_writer.add_tuple(
@@ -415,7 +416,6 @@ impl Visitor<'_> {
Arg::Label(id), Arg::Label(id),
Arg::Int(*kind_id), Arg::Int(*kind_id),
sliced_source_arg(self.source, node), sliced_source_arg(self.source, node),
Arg::Label(loc),
], ],
); );
} }
@@ -425,16 +425,16 @@ impl Visitor<'_> {
} => { } => {
if let Some(args) = self.complex_node(&node, fields, &child_nodes, id) { if let Some(args) = self.complex_node(&node, fields, &child_nodes, id) {
self.trap_writer.add_tuple( self.trap_writer.add_tuple(
&format!("{}_ast_node_parent", self.language_prefix), &format!("{}_ast_node_info", self.language_prefix),
vec![ vec![
Arg::Label(id), Arg::Label(id),
Arg::Label(parent_id), Arg::Label(parent_id),
Arg::Int(parent_index), Arg::Int(parent_index),
Arg::Label(loc),
], ],
); );
let mut all_args = vec![Arg::Label(id)]; let mut all_args = vec![Arg::Label(id)];
all_args.extend(args); all_args.extend(args);
all_args.push(Arg::Label(loc));
self.trap_writer.add_tuple(table_name, all_args); self.trap_writer.add_tuple(table_name, all_args);
} }
} }

View File

@@ -233,15 +233,6 @@ fn convert_nodes(
}); });
} }
// Finally, the type's defining table also includes the location.
main_table.columns.push(dbscheme::Column {
unique: false,
db_type: dbscheme::DbColumnType::Int,
name: "loc",
ql_type: ql::Type::At("location"),
ql_type_is_ref: true,
});
entries.push(dbscheme::Entry::Table(main_table)); entries.push(dbscheme::Entry::Table(main_table));
} }
node_types::EntryKind::Token { .. } => {} node_types::EntryKind::Token { .. } => {}
@@ -251,18 +242,24 @@ fn convert_nodes(
(entries, ast_node_members, token_kinds) (entries, ast_node_members, token_kinds)
} }
/// Creates a dbscheme table entry representing the parent relation for AST nodes. /// Creates a dbscheme table specifying the parent node and location for each
/// AST node.
/// ///
/// # Arguments /// # Arguments
/// - `name` - the name of both the table to create and the node parent type. /// - `name` - the name of the table to create.
/// - `parent_name` - the name of the parent type.
/// - `ast_node_name` - the name of the node child type. /// - `ast_node_name` - the name of the node child type.
fn create_ast_node_parent_table<'a>(name: &'a str, ast_node_name: &'a str) -> dbscheme::Table<'a> { fn create_ast_node_info_table<'a>(
name: &'a str,
parent_name: &'a str,
ast_node_name: &'a str,
) -> dbscheme::Table<'a> {
dbscheme::Table { dbscheme::Table {
name, name,
columns: vec![ columns: vec![
dbscheme::Column { dbscheme::Column {
db_type: dbscheme::DbColumnType::Int, db_type: dbscheme::DbColumnType::Int,
name: "child", name: "node",
unique: false, unique: false,
ql_type: ql::Type::At(ast_node_name), ql_type: ql::Type::At(ast_node_name),
ql_type_is_ref: true, ql_type_is_ref: true,
@@ -271,7 +268,7 @@ fn create_ast_node_parent_table<'a>(name: &'a str, ast_node_name: &'a str) -> db
db_type: dbscheme::DbColumnType::Int, db_type: dbscheme::DbColumnType::Int,
name: "parent", name: "parent",
unique: false, unique: false,
ql_type: ql::Type::At(name), ql_type: ql::Type::At(parent_name),
ql_type_is_ref: true, ql_type_is_ref: true,
}, },
dbscheme::Column { dbscheme::Column {
@@ -281,6 +278,13 @@ fn create_ast_node_parent_table<'a>(name: &'a str, ast_node_name: &'a str) -> db
ql_type: ql::Type::Int, ql_type: ql::Type::Int,
ql_type_is_ref: true, ql_type_is_ref: true,
}, },
dbscheme::Column {
unique: false,
db_type: dbscheme::DbColumnType::Int,
name: "loc",
ql_type: ql::Type::At("location"),
ql_type_is_ref: true,
},
], ],
keysets: Some(vec!["parent", "parent_index"]), keysets: Some(vec!["parent", "parent_index"]),
} }
@@ -312,13 +316,6 @@ fn create_tokeninfo<'a>(name: &'a str, type_name: &'a str) -> dbscheme::Table<'a
ql_type: ql::Type::String, ql_type: ql::Type::String,
ql_type_is_ref: true, ql_type_is_ref: true,
}, },
dbscheme::Column {
unique: false,
db_type: dbscheme::DbColumnType::Int,
name: "loc",
ql_type: ql::Type::At("location"),
ql_type_is_ref: true,
},
], ],
} }
} }
@@ -619,6 +616,7 @@ fn main() -> std::io::Result<()> {
for language in languages { for language in languages {
let prefix = node_types::to_snake_case(&language.name); let prefix = node_types::to_snake_case(&language.name);
let ast_node_name = format!("{}_ast_node", &prefix); let ast_node_name = format!("{}_ast_node", &prefix);
let node_info_table_name = format!("{}_ast_node_info", &prefix);
let ast_node_parent_name = format!("{}_ast_node_parent", &prefix); let ast_node_parent_name = format!("{}_ast_node_parent", &prefix);
let token_name = format!("{}_token", &prefix); let token_name = format!("{}_token", &prefix);
let tokeninfo_name = format!("{}_tokeninfo", &prefix); let tokeninfo_name = format!("{}_tokeninfo", &prefix);
@@ -641,7 +639,8 @@ fn main() -> std::io::Result<()> {
name: &ast_node_parent_name, name: &ast_node_parent_name,
members: [&ast_node_name, "file"].iter().cloned().collect(), members: [&ast_node_name, "file"].iter().cloned().collect(),
}), }),
dbscheme::Entry::Table(create_ast_node_parent_table( dbscheme::Entry::Table(create_ast_node_info_table(
&node_info_table_name,
&ast_node_parent_name, &ast_node_parent_name,
&ast_node_name, &ast_node_name,
)), )),
@@ -651,7 +650,7 @@ fn main() -> std::io::Result<()> {
let mut body = vec![ let mut body = vec![
ql::TopLevel::Class(ql_gen::create_ast_node_class( ql::TopLevel::Class(ql_gen::create_ast_node_class(
&ast_node_name, &ast_node_name,
&ast_node_parent_name, &node_info_table_name,
)), )),
ql::TopLevel::Class(ql_gen::create_token_class(&token_name, &tokeninfo_name)), ql::TopLevel::Class(ql_gen::create_token_class(&token_name, &tokeninfo_name)),
ql::TopLevel::Class(ql_gen::create_reserved_word_class(&reserved_word_name)), ql::TopLevel::Class(ql_gen::create_reserved_word_class(&reserved_word_name)),

View File

@@ -3,7 +3,7 @@ use std::collections::BTreeSet;
/// Creates the hard-coded `AstNode` class that acts as a supertype of all /// Creates the hard-coded `AstNode` class that acts as a supertype of all
/// classes we generate. /// classes we generate.
pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) -> ql::Class<'a> { pub fn create_ast_node_class<'a>(ast_node: &'a str, node_info_table: &'a str) -> ql::Class<'a> {
// Default implementation of `toString` calls `this.getAPrimaryQlClass()` // Default implementation of `toString` calls `this.getAPrimaryQlClass()`
let to_string = ql::Predicate { let to_string = ql::Predicate {
qldoc: Some(String::from( qldoc: Some(String::from(
@@ -22,12 +22,22 @@ pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) ->
)), )),
), ),
}; };
let get_location = create_none_predicate( let get_location = ql::Predicate {
Some(String::from("Gets the location of this element.")), name: "getLocation",
"getLocation", qldoc: Some(String::from("Gets the location of this element.")),
false, overridden: false,
Some(ql::Type::Normal("L::Location")), return_type: Some(ql::Type::Normal("L::Location")),
); formal_parameters: vec![],
body: ql::Expression::Pred(
node_info_table,
vec![
ql::Expression::Var("this"),
ql::Expression::Var("_"), // parent
ql::Expression::Var("_"), // parent index
ql::Expression::Var("result"), // location
],
),
};
let get_a_field_or_child = create_none_predicate( let get_a_field_or_child = create_none_predicate(
Some(String::from("Gets a field or child node of this node.")), Some(String::from("Gets a field or child node of this node.")),
"getAFieldOrChild", "getAFieldOrChild",
@@ -41,11 +51,12 @@ pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) ->
return_type: Some(ql::Type::Normal("AstNode")), return_type: Some(ql::Type::Normal("AstNode")),
formal_parameters: vec![], formal_parameters: vec![],
body: ql::Expression::Pred( body: ql::Expression::Pred(
ast_node_parent, node_info_table,
vec![ vec![
ql::Expression::Var("this"), ql::Expression::Var("this"),
ql::Expression::Var("result"), ql::Expression::Var("result"),
ql::Expression::Var("_"), ql::Expression::Var("_"), // parent index
ql::Expression::Var("_"), // location
], ],
), ),
}; };
@@ -58,11 +69,12 @@ pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) ->
return_type: Some(ql::Type::Int), return_type: Some(ql::Type::Int),
formal_parameters: vec![], formal_parameters: vec![],
body: ql::Expression::Pred( body: ql::Expression::Pred(
ast_node_parent, node_info_table,
vec![ vec![
ql::Expression::Var("this"), ql::Expression::Var("this"),
ql::Expression::Var("_"), ql::Expression::Var("_"), // parent
ql::Expression::Var("result"), ql::Expression::Var("result"), // parent index
ql::Expression::Var("_"), // location
], ],
), ),
}; };
@@ -123,7 +135,7 @@ pub fn create_ast_node_class<'a>(ast_node: &'a str, ast_node_parent: &'a str) ->
} }
pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Class<'a> { pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Class<'a> {
let tokeninfo_arity = 4; let tokeninfo_arity = 3; // id, kind, value
let get_value = ql::Predicate { let get_value = ql::Predicate {
qldoc: Some(String::from("Gets the value of this token.")), qldoc: Some(String::from("Gets the value of this token.")),
name: "getValue", name: "getValue",
@@ -132,14 +144,6 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl
formal_parameters: vec![], formal_parameters: vec![],
body: create_get_field_expr_for_column_storage("result", tokeninfo, 1, tokeninfo_arity), body: create_get_field_expr_for_column_storage("result", tokeninfo, 1, tokeninfo_arity),
}; };
let get_location = ql::Predicate {
qldoc: Some(String::from("Gets the location of this token.")),
name: "getLocation",
overridden: true,
return_type: Some(ql::Type::Normal("L::Location")),
formal_parameters: vec![],
body: create_get_field_expr_for_column_storage("result", tokeninfo, 2, tokeninfo_arity),
};
let to_string = ql::Predicate { let to_string = ql::Predicate {
qldoc: Some(String::from( qldoc: Some(String::from(
"Gets a string representation of this element.", "Gets a string representation of this element.",
@@ -167,7 +171,7 @@ pub fn create_token_class<'a>(token_type: &'a str, tokeninfo: &'a str) -> ql::Cl
characteristic_predicate: None, characteristic_predicate: None,
predicates: vec![ predicates: vec![
get_value, get_value,
get_location, //get_location,
to_string, to_string,
create_get_a_primary_ql_class("Token"), create_get_a_primary_ql_class("Token"),
], ],
@@ -225,55 +229,6 @@ fn create_get_a_primary_ql_class(class_name: &str) -> ql::Predicate {
} }
} }
/// Creates the `getLocation` predicate.
///
/// # Arguments
///
/// `def_table` - the name of the table that defines the entity and its location.
/// `arity` - the total number of columns in the table
fn create_get_location_predicate(def_table: &str, arity: usize) -> ql::Predicate {
ql::Predicate {
qldoc: Some(String::from("Gets the location of this element.")),
name: "getLocation",
overridden: true,
return_type: Some(ql::Type::Normal("L::Location")),
formal_parameters: vec![],
// body of the form: foo_bar_def(_, _, ..., result)
body: ql::Expression::Pred(
def_table,
[
vec![ql::Expression::Var("this")],
vec![ql::Expression::Var("_"); arity - 2],
vec![ql::Expression::Var("result")],
]
.concat(),
),
}
}
/// Creates the `getText` predicate for a leaf node.
///
/// # Arguments
///
/// `def_table` - the name of the table that defines the entity and its text.
fn create_get_text_predicate(def_table: &str) -> ql::Predicate {
ql::Predicate {
qldoc: Some(String::from("Gets the text content of this element.")),
name: "getText",
overridden: false,
return_type: Some(ql::Type::String),
formal_parameters: vec![],
body: ql::Expression::Pred(
def_table,
vec![
ql::Expression::Var("this"),
ql::Expression::Var("result"),
ql::Expression::Var("_"),
],
),
}
}
/// Returns an expression to get a field that's defined as a column in the parent's table. /// Returns an expression to get a field that's defined as a column in the parent's table.
/// ///
/// # Arguments /// # Arguments
@@ -532,20 +487,17 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec<ql::TopLevel> {
name: main_table_name, name: main_table_name,
fields, fields,
} => { } => {
// Count how many columns there will be in the main table. if fields.is_empty() {
// There will be: panic!("Encountered node '{}' with no fields", type_name.kind);
// - one for the id }
// - one for the location
// - one for each field that's stored as a column // Count how many columns there will be in the main table. There
// - if there are no fields, one for the text column. // will be one for the id, plus one for each field that's stored
let main_table_arity = 2 + if fields.is_empty() { // as a column.
1 let main_table_arity = 1 + fields
} else { .iter()
fields .filter(|&f| matches!(f.storage, node_types::Storage::Column { .. }))
.iter() .count();
.filter(|&f| matches!(f.storage, node_types::Storage::Column { .. }))
.count()
};
let main_class_name = &node.ql_class_name; let main_class_name = &node.ql_class_name;
let mut main_class = ql::Class { let mut main_class = ql::Class {
@@ -559,48 +511,39 @@ pub fn convert_nodes(nodes: &node_types::NodeTypeMap) -> Vec<ql::TopLevel> {
.into_iter() .into_iter()
.collect(), .collect(),
characteristic_predicate: None, characteristic_predicate: None,
predicates: vec![ predicates: vec![create_get_a_primary_ql_class(main_class_name)],
create_get_a_primary_ql_class(main_class_name),
create_get_location_predicate(main_table_name, main_table_arity),
],
}; };
if fields.is_empty() { let mut main_table_column_index: usize = 0;
main_class let mut get_child_exprs: Vec<ql::Expression> = Vec::new();
.predicates
.push(create_get_text_predicate(main_table_name));
} else {
let mut main_table_column_index: usize = 0;
let mut get_child_exprs: Vec<ql::Expression> = Vec::new();
// Iterate through the fields, creating: // Iterate through the fields, creating:
// - classes to wrap union types if fields need them, // - classes to wrap union types if fields need them,
// - predicates to access the fields, // - predicates to access the fields,
// - the QL expressions to access the fields that will be part of getAFieldOrChild. // - the QL expressions to access the fields that will be part of getAFieldOrChild.
for field in fields { for field in fields {
let (get_pred, get_child_expr) = create_field_getters( let (get_pred, get_child_expr) = create_field_getters(
main_table_name, main_table_name,
main_table_arity, main_table_arity,
&mut main_table_column_index, &mut main_table_column_index,
field, field,
nodes, nodes,
); );
main_class.predicates.push(get_pred); main_class.predicates.push(get_pred);
if let Some(get_child_expr) = get_child_expr { if let Some(get_child_expr) = get_child_expr {
get_child_exprs.push(get_child_expr) get_child_exprs.push(get_child_expr)
}
} }
main_class.predicates.push(ql::Predicate {
qldoc: Some(String::from("Gets a field or child node of this node.")),
name: "getAFieldOrChild",
overridden: true,
return_type: Some(ql::Type::Normal("AstNode")),
formal_parameters: vec![],
body: ql::Expression::Or(get_child_exprs),
});
} }
main_class.predicates.push(ql::Predicate {
qldoc: Some(String::from("Gets a field or child node of this node.")),
name: "getAFieldOrChild",
overridden: true,
return_type: Some(ql::Type::Normal("AstNode")),
formal_parameters: vec![],
body: ql::Expression::Or(get_child_exprs),
});
classes.push(ql::TopLevel::Class(main_class)); classes.push(ql::TopLevel::Class(main_class));
} }
} }

View File

@@ -126,7 +126,7 @@ class AstNode extends TAstNode {
/** A Ruby source file */ /** A Ruby source file */
class RubyFile extends File { class RubyFile extends File {
RubyFile() { ruby_ast_node_parent(_, this, _) } RubyFile() { ruby_ast_node_info(_, this, _, _) }
/** Gets a token in this file. */ /** Gets a token in this file. */
private Ruby::Token getAToken() { result.getLocation().getFile() = this } private Ruby::Token getAToken() { result.getLocation().getFile() = this }

File diff suppressed because it is too large Load Diff

View File

@@ -81,8 +81,7 @@ case @diagnostic.severity of
ruby_alias_def( ruby_alias_def(
unique int id: @ruby_alias, unique int id: @ruby_alias,
int alias: @ruby_underscore_method_name ref, int alias: @ruby_underscore_method_name ref,
int name: @ruby_underscore_method_name ref, int name: @ruby_underscore_method_name ref
int loc: @location ref
); );
#keyset[ruby_alternative_pattern, index] #keyset[ruby_alternative_pattern, index]
@@ -93,8 +92,7 @@ ruby_alternative_pattern_alternatives(
); );
ruby_alternative_pattern_def( ruby_alternative_pattern_def(
unique int id: @ruby_alternative_pattern, unique int id: @ruby_alternative_pattern
int loc: @location ref
); );
@ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression @ruby_argument_list_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression
@@ -107,8 +105,7 @@ ruby_argument_list_child(
); );
ruby_argument_list_def( ruby_argument_list_def(
unique int id: @ruby_argument_list, unique int id: @ruby_argument_list
int loc: @location ref
); );
@ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression @ruby_array_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression
@@ -121,8 +118,7 @@ ruby_array_child(
); );
ruby_array_def( ruby_array_def(
unique int id: @ruby_array, unique int id: @ruby_array
int loc: @location ref
); );
ruby_array_pattern_class( ruby_array_pattern_class(
@@ -140,15 +136,13 @@ ruby_array_pattern_child(
); );
ruby_array_pattern_def( ruby_array_pattern_def(
unique int id: @ruby_array_pattern, unique int id: @ruby_array_pattern
int loc: @location ref
); );
ruby_as_pattern_def( ruby_as_pattern_def(
unique int id: @ruby_as_pattern, unique int id: @ruby_as_pattern,
int name: @ruby_token_identifier ref, int name: @ruby_token_identifier ref,
int value: @ruby_underscore_pattern_expr ref, int value: @ruby_underscore_pattern_expr ref
int loc: @location ref
); );
@ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs @ruby_assignment_left_type = @ruby_left_assignment_list | @ruby_underscore_lhs
@@ -158,8 +152,7 @@ ruby_as_pattern_def(
ruby_assignment_def( ruby_assignment_def(
unique int id: @ruby_assignment, unique int id: @ruby_assignment,
int left: @ruby_assignment_left_type ref, int left: @ruby_assignment_left_type ref,
int right: @ruby_assignment_right_type ref, int right: @ruby_assignment_right_type ref
int loc: @location ref
); );
@ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_bare_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -172,8 +165,7 @@ ruby_bare_string_child(
); );
ruby_bare_string_def( ruby_bare_string_def(
unique int id: @ruby_bare_string, unique int id: @ruby_bare_string
int loc: @location ref
); );
@ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_bare_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -186,8 +178,7 @@ ruby_bare_symbol_child(
); );
ruby_bare_symbol_def( ruby_bare_symbol_def(
unique int id: @ruby_bare_symbol, unique int id: @ruby_bare_symbol
int loc: @location ref
); );
@ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement @ruby_begin_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
@@ -200,8 +191,7 @@ ruby_begin_child(
); );
ruby_begin_def( ruby_begin_def(
unique int id: @ruby_begin, unique int id: @ruby_begin
int loc: @location ref
); );
@ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_begin_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -214,8 +204,7 @@ ruby_begin_block_child(
); );
ruby_begin_block_def( ruby_begin_block_def(
unique int id: @ruby_begin_block, unique int id: @ruby_begin_block
int loc: @location ref
); );
case @ruby_binary.operator of case @ruby_binary.operator of
@@ -251,8 +240,7 @@ ruby_binary_def(
unique int id: @ruby_binary, unique int id: @ruby_binary,
int left: @ruby_underscore_expression ref, int left: @ruby_underscore_expression ref,
int operator: int ref, int operator: int ref,
int right: @ruby_underscore_expression ref, int right: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_block_parameters( ruby_block_parameters(
@@ -270,8 +258,7 @@ ruby_block_child(
); );
ruby_block_def( ruby_block_def(
unique int id: @ruby_block, unique int id: @ruby_block
int loc: @location ref
); );
ruby_block_argument_child( ruby_block_argument_child(
@@ -280,8 +267,7 @@ ruby_block_argument_child(
); );
ruby_block_argument_def( ruby_block_argument_def(
unique int id: @ruby_block_argument, unique int id: @ruby_block_argument
int loc: @location ref
); );
ruby_block_parameter_name( ruby_block_parameter_name(
@@ -290,8 +276,7 @@ ruby_block_parameter_name(
); );
ruby_block_parameter_def( ruby_block_parameter_def(
unique int id: @ruby_block_parameter, unique int id: @ruby_block_parameter
int loc: @location ref
); );
@ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier @ruby_block_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier
@@ -304,8 +289,7 @@ ruby_block_parameters_child(
); );
ruby_block_parameters_def( ruby_block_parameters_def(
unique int id: @ruby_block_parameters, unique int id: @ruby_block_parameters
int loc: @location ref
); );
ruby_break_child( ruby_break_child(
@@ -314,8 +298,7 @@ ruby_break_child(
); );
ruby_break_def( ruby_break_def(
unique int id: @ruby_break, unique int id: @ruby_break
int loc: @location ref
); );
ruby_call_arguments( ruby_call_arguments(
@@ -341,8 +324,7 @@ ruby_call_receiver(
ruby_call_def( ruby_call_def(
unique int id: @ruby_call, unique int id: @ruby_call,
int method: @ruby_call_method_type ref, int method: @ruby_call_method_type ref
int loc: @location ref
); );
ruby_case_value( ruby_case_value(
@@ -360,8 +342,7 @@ ruby_case_child(
); );
ruby_case_def( ruby_case_def(
unique int id: @ruby_case__, unique int id: @ruby_case__
int loc: @location ref
); );
#keyset[ruby_case_match, index] #keyset[ruby_case_match, index]
@@ -378,8 +359,7 @@ ruby_case_match_else(
ruby_case_match_def( ruby_case_match_def(
unique int id: @ruby_case_match, unique int id: @ruby_case_match,
int value: @ruby_underscore_statement ref, int value: @ruby_underscore_statement ref
int loc: @location ref
); );
#keyset[ruby_chained_string, index] #keyset[ruby_chained_string, index]
@@ -390,8 +370,7 @@ ruby_chained_string_child(
); );
ruby_chained_string_def( ruby_chained_string_def(
unique int id: @ruby_chained_string, unique int id: @ruby_chained_string
int loc: @location ref
); );
@ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant @ruby_class_name_type = @ruby_scope_resolution | @ruby_token_constant
@@ -412,16 +391,14 @@ ruby_class_child(
ruby_class_def( ruby_class_def(
unique int id: @ruby_class, unique int id: @ruby_class,
int name: @ruby_class_name_type ref, int name: @ruby_class_name_type ref
int loc: @location ref
); );
ruby_conditional_def( ruby_conditional_def(
unique int id: @ruby_conditional, unique int id: @ruby_conditional,
int alternative: @ruby_underscore_arg ref, int alternative: @ruby_underscore_arg ref,
int condition: @ruby_underscore_arg ref, int condition: @ruby_underscore_arg ref,
int consequence: @ruby_underscore_arg ref, int consequence: @ruby_underscore_arg ref
int loc: @location ref
); );
@ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_delimited_symbol_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -434,8 +411,7 @@ ruby_delimited_symbol_child(
); );
ruby_delimited_symbol_def( ruby_delimited_symbol_def(
unique int id: @ruby_delimited_symbol, unique int id: @ruby_delimited_symbol
int loc: @location ref
); );
@ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs @ruby_destructured_left_assignment_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs
@@ -448,8 +424,7 @@ ruby_destructured_left_assignment_child(
); );
ruby_destructured_left_assignment_def( ruby_destructured_left_assignment_def(
unique int id: @ruby_destructured_left_assignment, unique int id: @ruby_destructured_left_assignment
int loc: @location ref
); );
@ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier @ruby_destructured_parameter_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier
@@ -462,8 +437,7 @@ ruby_destructured_parameter_child(
); );
ruby_destructured_parameter_def( ruby_destructured_parameter_def(
unique int id: @ruby_destructured_parameter, unique int id: @ruby_destructured_parameter
int loc: @location ref
); );
@ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_do_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -476,8 +450,7 @@ ruby_do_child(
); );
ruby_do_def( ruby_do_def(
unique int id: @ruby_do, unique int id: @ruby_do
int loc: @location ref
); );
ruby_do_block_parameters( ruby_do_block_parameters(
@@ -495,8 +468,7 @@ ruby_do_block_child(
); );
ruby_do_block_def( ruby_do_block_def(
unique int id: @ruby_do_block, unique int id: @ruby_do_block
int loc: @location ref
); );
@ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression @ruby_element_reference_child_type = @ruby_block_argument | @ruby_hash_splat_argument | @ruby_pair | @ruby_splat_argument | @ruby_token_forward_argument | @ruby_underscore_expression
@@ -510,8 +482,7 @@ ruby_element_reference_child(
ruby_element_reference_def( ruby_element_reference_def(
unique int id: @ruby_element_reference, unique int id: @ruby_element_reference,
int object: @ruby_underscore_primary ref, int object: @ruby_underscore_primary ref
int loc: @location ref
); );
@ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_else_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -524,8 +495,7 @@ ruby_else_child(
); );
ruby_else_def( ruby_else_def(
unique int id: @ruby_else, unique int id: @ruby_else
int loc: @location ref
); );
@ruby_elsif_alternative_type = @ruby_else | @ruby_elsif @ruby_elsif_alternative_type = @ruby_else | @ruby_elsif
@@ -542,8 +512,7 @@ ruby_elsif_consequence(
ruby_elsif_def( ruby_elsif_def(
unique int id: @ruby_elsif, unique int id: @ruby_elsif,
int condition: @ruby_underscore_statement ref, int condition: @ruby_underscore_statement ref
int loc: @location ref
); );
@ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_end_block_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -556,8 +525,7 @@ ruby_end_block_child(
); );
ruby_end_block_def( ruby_end_block_def(
unique int id: @ruby_end_block, unique int id: @ruby_end_block
int loc: @location ref
); );
@ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_ensure_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -570,14 +538,12 @@ ruby_ensure_child(
); );
ruby_ensure_def( ruby_ensure_def(
unique int id: @ruby_ensure, unique int id: @ruby_ensure
int loc: @location ref
); );
ruby_exception_variable_def( ruby_exception_variable_def(
unique int id: @ruby_exception_variable, unique int id: @ruby_exception_variable,
int child: @ruby_underscore_lhs ref, int child: @ruby_underscore_lhs ref
int loc: @location ref
); );
@ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg @ruby_exceptions_child_type = @ruby_splat_argument | @ruby_underscore_arg
@@ -590,14 +556,12 @@ ruby_exceptions_child(
); );
ruby_exceptions_def( ruby_exceptions_def(
unique int id: @ruby_exceptions, unique int id: @ruby_exceptions
int loc: @location ref
); );
ruby_expression_reference_pattern_def( ruby_expression_reference_pattern_def(
unique int id: @ruby_expression_reference_pattern, unique int id: @ruby_expression_reference_pattern,
int value: @ruby_underscore_expression ref, int value: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_find_pattern_class( ruby_find_pattern_class(
@@ -615,8 +579,7 @@ ruby_find_pattern_child(
); );
ruby_find_pattern_def( ruby_find_pattern_def(
unique int id: @ruby_find_pattern, unique int id: @ruby_find_pattern
int loc: @location ref
); );
@ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs @ruby_for_pattern_type = @ruby_left_assignment_list | @ruby_underscore_lhs
@@ -625,8 +588,7 @@ ruby_for_def(
unique int id: @ruby_for, unique int id: @ruby_for,
int body: @ruby_do ref, int body: @ruby_do ref,
int pattern: @ruby_for_pattern_type ref, int pattern: @ruby_for_pattern_type ref,
int value: @ruby_in ref, int value: @ruby_in ref
int loc: @location ref
); );
@ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair @ruby_hash_child_type = @ruby_hash_splat_argument | @ruby_pair
@@ -639,8 +601,7 @@ ruby_hash_child(
); );
ruby_hash_def( ruby_hash_def(
unique int id: @ruby_hash, unique int id: @ruby_hash
int loc: @location ref
); );
ruby_hash_pattern_class( ruby_hash_pattern_class(
@@ -658,14 +619,12 @@ ruby_hash_pattern_child(
); );
ruby_hash_pattern_def( ruby_hash_pattern_def(
unique int id: @ruby_hash_pattern, unique int id: @ruby_hash_pattern
int loc: @location ref
); );
ruby_hash_splat_argument_def( ruby_hash_splat_argument_def(
unique int id: @ruby_hash_splat_argument, unique int id: @ruby_hash_splat_argument,
int child: @ruby_underscore_arg ref, int child: @ruby_underscore_arg ref
int loc: @location ref
); );
ruby_hash_splat_parameter_name( ruby_hash_splat_parameter_name(
@@ -674,8 +633,7 @@ ruby_hash_splat_parameter_name(
); );
ruby_hash_splat_parameter_def( ruby_hash_splat_parameter_def(
unique int id: @ruby_hash_splat_parameter, unique int id: @ruby_hash_splat_parameter
int loc: @location ref
); );
@ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end @ruby_heredoc_body_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_heredoc_content | @ruby_token_heredoc_end
@@ -688,8 +646,7 @@ ruby_heredoc_body_child(
); );
ruby_heredoc_body_def( ruby_heredoc_body_def(
unique int id: @ruby_heredoc_body, unique int id: @ruby_heredoc_body
int loc: @location ref
); );
@ruby_if_alternative_type = @ruby_else | @ruby_elsif @ruby_if_alternative_type = @ruby_else | @ruby_elsif
@@ -706,27 +663,23 @@ ruby_if_consequence(
ruby_if_def( ruby_if_def(
unique int id: @ruby_if, unique int id: @ruby_if,
int condition: @ruby_underscore_statement ref, int condition: @ruby_underscore_statement ref
int loc: @location ref
); );
ruby_if_guard_def( ruby_if_guard_def(
unique int id: @ruby_if_guard, unique int id: @ruby_if_guard,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_if_modifier_def( ruby_if_modifier_def(
unique int id: @ruby_if_modifier, unique int id: @ruby_if_modifier,
int body: @ruby_underscore_statement ref, int body: @ruby_underscore_statement ref,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_in_def( ruby_in_def(
unique int id: @ruby_in, unique int id: @ruby_in,
int child: @ruby_underscore_arg ref, int child: @ruby_underscore_arg ref
int loc: @location ref
); );
ruby_in_clause_body( ruby_in_clause_body(
@@ -743,8 +696,7 @@ ruby_in_clause_guard(
ruby_in_clause_def( ruby_in_clause_def(
unique int id: @ruby_in_clause, unique int id: @ruby_in_clause,
int pattern: @ruby_underscore_pattern_top_expr_body ref, int pattern: @ruby_underscore_pattern_top_expr_body ref
int loc: @location ref
); );
@ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_interpolation_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -757,8 +709,7 @@ ruby_interpolation_child(
); );
ruby_interpolation_def( ruby_interpolation_def(
unique int id: @ruby_interpolation, unique int id: @ruby_interpolation
int loc: @location ref
); );
ruby_keyword_parameter_value( ruby_keyword_parameter_value(
@@ -768,8 +719,7 @@ ruby_keyword_parameter_value(
ruby_keyword_parameter_def( ruby_keyword_parameter_def(
unique int id: @ruby_keyword_parameter, unique int id: @ruby_keyword_parameter,
int name: @ruby_token_identifier ref, int name: @ruby_token_identifier ref
int loc: @location ref
); );
@ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol @ruby_keyword_pattern_key_type = @ruby_string__ | @ruby_token_hash_key_symbol
@@ -781,8 +731,7 @@ ruby_keyword_pattern_value(
ruby_keyword_pattern_def( ruby_keyword_pattern_def(
unique int id: @ruby_keyword_pattern, unique int id: @ruby_keyword_pattern,
int key__: @ruby_keyword_pattern_key_type ref, int key__: @ruby_keyword_pattern_key_type ref
int loc: @location ref
); );
@ruby_lambda_body_type = @ruby_block | @ruby_do_block @ruby_lambda_body_type = @ruby_block | @ruby_do_block
@@ -794,8 +743,7 @@ ruby_lambda_parameters(
ruby_lambda_def( ruby_lambda_def(
unique int id: @ruby_lambda, unique int id: @ruby_lambda,
int body: @ruby_lambda_body_type ref, int body: @ruby_lambda_body_type ref
int loc: @location ref
); );
@ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier @ruby_lambda_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier
@@ -808,8 +756,7 @@ ruby_lambda_parameters_child(
); );
ruby_lambda_parameters_def( ruby_lambda_parameters_def(
unique int id: @ruby_lambda_parameters, unique int id: @ruby_lambda_parameters
int loc: @location ref
); );
@ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs @ruby_left_assignment_list_child_type = @ruby_destructured_left_assignment | @ruby_rest_assignment | @ruby_underscore_lhs
@@ -822,8 +769,7 @@ ruby_left_assignment_list_child(
); );
ruby_left_assignment_list_def( ruby_left_assignment_list_def(
unique int id: @ruby_left_assignment_list, unique int id: @ruby_left_assignment_list
int loc: @location ref
); );
ruby_method_parameters( ruby_method_parameters(
@@ -842,8 +788,7 @@ ruby_method_child(
ruby_method_def( ruby_method_def(
unique int id: @ruby_method, unique int id: @ruby_method,
int name: @ruby_underscore_method_name ref, int name: @ruby_underscore_method_name ref
int loc: @location ref
); );
@ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier @ruby_method_parameters_child_type = @ruby_block_parameter | @ruby_destructured_parameter | @ruby_hash_splat_parameter | @ruby_keyword_parameter | @ruby_optional_parameter | @ruby_splat_parameter | @ruby_token_forward_parameter | @ruby_token_hash_splat_nil | @ruby_token_identifier
@@ -856,8 +801,7 @@ ruby_method_parameters_child(
); );
ruby_method_parameters_def( ruby_method_parameters_def(
unique int id: @ruby_method_parameters, unique int id: @ruby_method_parameters
int loc: @location ref
); );
@ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant @ruby_module_name_type = @ruby_scope_resolution | @ruby_token_constant
@@ -873,8 +817,7 @@ ruby_module_child(
ruby_module_def( ruby_module_def(
unique int id: @ruby_module, unique int id: @ruby_module,
int name: @ruby_module_name_type ref, int name: @ruby_module_name_type ref
int loc: @location ref
); );
ruby_next_child( ruby_next_child(
@@ -883,8 +826,7 @@ ruby_next_child(
); );
ruby_next_def( ruby_next_def(
unique int id: @ruby_next, unique int id: @ruby_next
int loc: @location ref
); );
case @ruby_operator_assignment.operator of case @ruby_operator_assignment.operator of
@@ -908,15 +850,13 @@ ruby_operator_assignment_def(
unique int id: @ruby_operator_assignment, unique int id: @ruby_operator_assignment,
int left: @ruby_underscore_lhs ref, int left: @ruby_underscore_lhs ref,
int operator: int ref, int operator: int ref,
int right: @ruby_underscore_expression ref, int right: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_optional_parameter_def( ruby_optional_parameter_def(
unique int id: @ruby_optional_parameter, unique int id: @ruby_optional_parameter,
int name: @ruby_token_identifier ref, int name: @ruby_token_identifier ref,
int value: @ruby_underscore_arg ref, int value: @ruby_underscore_arg ref
int loc: @location ref
); );
@ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg @ruby_pair_key_type = @ruby_string__ | @ruby_token_hash_key_symbol | @ruby_underscore_arg
@@ -928,14 +868,12 @@ ruby_pair_value(
ruby_pair_def( ruby_pair_def(
unique int id: @ruby_pair, unique int id: @ruby_pair,
int key__: @ruby_pair_key_type ref, int key__: @ruby_pair_key_type ref
int loc: @location ref
); );
ruby_parenthesized_pattern_def( ruby_parenthesized_pattern_def(
unique int id: @ruby_parenthesized_pattern, unique int id: @ruby_parenthesized_pattern,
int child: @ruby_underscore_pattern_expr ref, int child: @ruby_underscore_pattern_expr ref
int loc: @location ref
); );
@ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_parenthesized_statements_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -948,16 +886,14 @@ ruby_parenthesized_statements_child(
); );
ruby_parenthesized_statements_def( ruby_parenthesized_statements_def(
unique int id: @ruby_parenthesized_statements, unique int id: @ruby_parenthesized_statements
int loc: @location ref
); );
@ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg @ruby_pattern_child_type = @ruby_splat_argument | @ruby_underscore_arg
ruby_pattern_def( ruby_pattern_def(
unique int id: @ruby_pattern, unique int id: @ruby_pattern,
int child: @ruby_pattern_child_type ref, int child: @ruby_pattern_child_type ref
int loc: @location ref
); );
@ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement @ruby_program_child_type = @ruby_token_empty_statement | @ruby_token_uninterpreted | @ruby_underscore_statement
@@ -970,8 +906,7 @@ ruby_program_child(
); );
ruby_program_def( ruby_program_def(
unique int id: @ruby_program, unique int id: @ruby_program
int loc: @location ref
); );
@ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive @ruby_range_begin_type = @ruby_underscore_arg | @ruby_underscore_pattern_primitive
@@ -996,16 +931,14 @@ case @ruby_range.operator of
ruby_range_def( ruby_range_def(
unique int id: @ruby_range, unique int id: @ruby_range,
int operator: int ref, int operator: int ref
int loc: @location ref
); );
@ruby_rational_child_type = @ruby_token_float | @ruby_token_integer @ruby_rational_child_type = @ruby_token_float | @ruby_token_integer
ruby_rational_def( ruby_rational_def(
unique int id: @ruby_rational, unique int id: @ruby_rational,
int child: @ruby_rational_child_type ref, int child: @ruby_rational_child_type ref
int loc: @location ref
); );
ruby_redo_child( ruby_redo_child(
@@ -1014,8 +947,7 @@ ruby_redo_child(
); );
ruby_redo_def( ruby_redo_def(
unique int id: @ruby_redo, unique int id: @ruby_redo
int loc: @location ref
); );
@ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_regex_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -1028,8 +960,7 @@ ruby_regex_child(
); );
ruby_regex_def( ruby_regex_def(
unique int id: @ruby_regex, unique int id: @ruby_regex
int loc: @location ref
); );
ruby_rescue_body( ruby_rescue_body(
@@ -1048,8 +979,7 @@ ruby_rescue_variable(
); );
ruby_rescue_def( ruby_rescue_def(
unique int id: @ruby_rescue, unique int id: @ruby_rescue
int loc: @location ref
); );
@ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement @ruby_rescue_modifier_body_type = @ruby_underscore_arg | @ruby_underscore_statement
@@ -1057,8 +987,7 @@ ruby_rescue_def(
ruby_rescue_modifier_def( ruby_rescue_modifier_def(
unique int id: @ruby_rescue_modifier, unique int id: @ruby_rescue_modifier,
int body: @ruby_rescue_modifier_body_type ref, int body: @ruby_rescue_modifier_body_type ref,
int handler: @ruby_underscore_expression ref, int handler: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_rest_assignment_child( ruby_rest_assignment_child(
@@ -1067,8 +996,7 @@ ruby_rest_assignment_child(
); );
ruby_rest_assignment_def( ruby_rest_assignment_def(
unique int id: @ruby_rest_assignment, unique int id: @ruby_rest_assignment
int loc: @location ref
); );
ruby_retry_child( ruby_retry_child(
@@ -1077,8 +1005,7 @@ ruby_retry_child(
); );
ruby_retry_def( ruby_retry_def(
unique int id: @ruby_retry, unique int id: @ruby_retry
int loc: @location ref
); );
ruby_return_child( ruby_return_child(
@@ -1087,8 +1014,7 @@ ruby_return_child(
); );
ruby_return_def( ruby_return_def(
unique int id: @ruby_return, unique int id: @ruby_return
int loc: @location ref
); );
@ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg @ruby_right_assignment_list_child_type = @ruby_splat_argument | @ruby_underscore_arg
@@ -1101,8 +1027,7 @@ ruby_right_assignment_list_child(
); );
ruby_right_assignment_list_def( ruby_right_assignment_list_def(
unique int id: @ruby_right_assignment_list, unique int id: @ruby_right_assignment_list
int loc: @location ref
); );
@ruby_scope_resolution_name_type = @ruby_token_constant | @ruby_token_identifier @ruby_scope_resolution_name_type = @ruby_token_constant | @ruby_token_identifier
@@ -1116,14 +1041,12 @@ ruby_scope_resolution_scope(
ruby_scope_resolution_def( ruby_scope_resolution_def(
unique int id: @ruby_scope_resolution, unique int id: @ruby_scope_resolution,
int name: @ruby_scope_resolution_name_type ref, int name: @ruby_scope_resolution_name_type ref
int loc: @location ref
); );
ruby_setter_def( ruby_setter_def(
unique int id: @ruby_setter, unique int id: @ruby_setter,
int name: @ruby_token_identifier ref, int name: @ruby_token_identifier ref
int loc: @location ref
); );
@ruby_singleton_class_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement @ruby_singleton_class_child_type = @ruby_else | @ruby_ensure | @ruby_rescue | @ruby_token_empty_statement | @ruby_underscore_statement
@@ -1137,8 +1060,7 @@ ruby_singleton_class_child(
ruby_singleton_class_def( ruby_singleton_class_def(
unique int id: @ruby_singleton_class, unique int id: @ruby_singleton_class,
int value: @ruby_underscore_arg ref, int value: @ruby_underscore_arg ref
int loc: @location ref
); );
@ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable @ruby_singleton_method_object_type = @ruby_underscore_arg | @ruby_underscore_variable
@@ -1160,14 +1082,12 @@ ruby_singleton_method_child(
ruby_singleton_method_def( ruby_singleton_method_def(
unique int id: @ruby_singleton_method, unique int id: @ruby_singleton_method,
int name: @ruby_underscore_method_name ref, int name: @ruby_underscore_method_name ref,
int object: @ruby_singleton_method_object_type ref, int object: @ruby_singleton_method_object_type ref
int loc: @location ref
); );
ruby_splat_argument_def( ruby_splat_argument_def(
unique int id: @ruby_splat_argument, unique int id: @ruby_splat_argument,
int child: @ruby_underscore_arg ref, int child: @ruby_underscore_arg ref
int loc: @location ref
); );
ruby_splat_parameter_name( ruby_splat_parameter_name(
@@ -1176,8 +1096,7 @@ ruby_splat_parameter_name(
); );
ruby_splat_parameter_def( ruby_splat_parameter_def(
unique int id: @ruby_splat_parameter, unique int id: @ruby_splat_parameter
int loc: @location ref
); );
@ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_string_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -1190,8 +1109,7 @@ ruby_string_child(
); );
ruby_string_def( ruby_string_def(
unique int id: @ruby_string__, unique int id: @ruby_string__
int loc: @location ref
); );
#keyset[ruby_string_array, index] #keyset[ruby_string_array, index]
@@ -1202,8 +1120,7 @@ ruby_string_array_child(
); );
ruby_string_array_def( ruby_string_array_def(
unique int id: @ruby_string_array, unique int id: @ruby_string_array
int loc: @location ref
); );
@ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content @ruby_subshell_child_type = @ruby_interpolation | @ruby_token_escape_sequence | @ruby_token_string_content
@@ -1216,14 +1133,12 @@ ruby_subshell_child(
); );
ruby_subshell_def( ruby_subshell_def(
unique int id: @ruby_subshell, unique int id: @ruby_subshell
int loc: @location ref
); );
ruby_superclass_def( ruby_superclass_def(
unique int id: @ruby_superclass, unique int id: @ruby_superclass,
int child: @ruby_underscore_expression ref, int child: @ruby_underscore_expression ref
int loc: @location ref
); );
#keyset[ruby_symbol_array, index] #keyset[ruby_symbol_array, index]
@@ -1234,8 +1149,7 @@ ruby_symbol_array_child(
); );
ruby_symbol_array_def( ruby_symbol_array_def(
unique int id: @ruby_symbol_array, unique int id: @ruby_symbol_array
int loc: @location ref
); );
@ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement @ruby_then_child_type = @ruby_token_empty_statement | @ruby_underscore_statement
@@ -1248,8 +1162,7 @@ ruby_then_child(
); );
ruby_then_def( ruby_then_def(
unique int id: @ruby_then, unique int id: @ruby_then
int loc: @location ref
); );
@ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric @ruby_unary_operand_type = @ruby_parenthesized_statements | @ruby_underscore_expression | @ruby_underscore_simple_numeric
@@ -1267,8 +1180,7 @@ case @ruby_unary.operator of
ruby_unary_def( ruby_unary_def(
unique int id: @ruby_unary, unique int id: @ruby_unary,
int operand: @ruby_unary_operand_type ref, int operand: @ruby_unary_operand_type ref,
int operator: int ref, int operator: int ref
int loc: @location ref
); );
#keyset[ruby_undef, index] #keyset[ruby_undef, index]
@@ -1279,8 +1191,7 @@ ruby_undef_child(
); );
ruby_undef_def( ruby_undef_def(
unique int id: @ruby_undef, unique int id: @ruby_undef
int loc: @location ref
); );
@ruby_unless_alternative_type = @ruby_else | @ruby_elsif @ruby_unless_alternative_type = @ruby_else | @ruby_elsif
@@ -1297,43 +1208,37 @@ ruby_unless_consequence(
ruby_unless_def( ruby_unless_def(
unique int id: @ruby_unless, unique int id: @ruby_unless,
int condition: @ruby_underscore_statement ref, int condition: @ruby_underscore_statement ref
int loc: @location ref
); );
ruby_unless_guard_def( ruby_unless_guard_def(
unique int id: @ruby_unless_guard, unique int id: @ruby_unless_guard,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_unless_modifier_def( ruby_unless_modifier_def(
unique int id: @ruby_unless_modifier, unique int id: @ruby_unless_modifier,
int body: @ruby_underscore_statement ref, int body: @ruby_underscore_statement ref,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_until_def( ruby_until_def(
unique int id: @ruby_until, unique int id: @ruby_until,
int body: @ruby_do ref, int body: @ruby_do ref,
int condition: @ruby_underscore_statement ref, int condition: @ruby_underscore_statement ref
int loc: @location ref
); );
ruby_until_modifier_def( ruby_until_modifier_def(
unique int id: @ruby_until_modifier, unique int id: @ruby_until_modifier,
int body: @ruby_underscore_statement ref, int body: @ruby_underscore_statement ref,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
@ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable @ruby_variable_reference_pattern_name_type = @ruby_token_identifier | @ruby_underscore_nonlocal_variable
ruby_variable_reference_pattern_def( ruby_variable_reference_pattern_def(
unique int id: @ruby_variable_reference_pattern, unique int id: @ruby_variable_reference_pattern,
int name: @ruby_variable_reference_pattern_name_type ref, int name: @ruby_variable_reference_pattern_name_type ref
int loc: @location ref
); );
ruby_when_body( ruby_when_body(
@@ -1349,22 +1254,19 @@ ruby_when_pattern(
); );
ruby_when_def( ruby_when_def(
unique int id: @ruby_when, unique int id: @ruby_when
int loc: @location ref
); );
ruby_while_def( ruby_while_def(
unique int id: @ruby_while, unique int id: @ruby_while,
int body: @ruby_do ref, int body: @ruby_do ref,
int condition: @ruby_underscore_statement ref, int condition: @ruby_underscore_statement ref
int loc: @location ref
); );
ruby_while_modifier_def( ruby_while_modifier_def(
unique int id: @ruby_while_modifier, unique int id: @ruby_while_modifier,
int body: @ruby_underscore_statement ref, int body: @ruby_underscore_statement ref,
int condition: @ruby_underscore_expression ref, int condition: @ruby_underscore_expression ref
int loc: @location ref
); );
ruby_yield_child( ruby_yield_child(
@@ -1373,15 +1275,13 @@ ruby_yield_child(
); );
ruby_yield_def( ruby_yield_def(
unique int id: @ruby_yield, unique int id: @ruby_yield
int loc: @location ref
); );
ruby_tokeninfo( ruby_tokeninfo(
unique int id: @ruby_token, unique int id: @ruby_token,
int kind: int ref, int kind: int ref,
string value: string ref, string value: string ref
int loc: @location ref
); );
case @ruby_token.kind of case @ruby_token.kind of
@@ -1425,34 +1325,31 @@ case @ruby_token.kind of
@ruby_ast_node_parent = @file | @ruby_ast_node @ruby_ast_node_parent = @file | @ruby_ast_node
#keyset[parent, parent_index] #keyset[parent, parent_index]
ruby_ast_node_parent( ruby_ast_node_info(
int child: @ruby_ast_node ref, int node: @ruby_ast_node ref,
int parent: @ruby_ast_node_parent ref, int parent: @ruby_ast_node_parent ref,
int parent_index: int ref int parent_index: int ref,
int loc: @location ref
); );
erb_comment_directive_def( erb_comment_directive_def(
unique int id: @erb_comment_directive, unique int id: @erb_comment_directive,
int child: @erb_token_comment ref, int child: @erb_token_comment ref
int loc: @location ref
); );
erb_directive_def( erb_directive_def(
unique int id: @erb_directive, unique int id: @erb_directive,
int child: @erb_token_code ref, int child: @erb_token_code ref
int loc: @location ref
); );
erb_graphql_directive_def( erb_graphql_directive_def(
unique int id: @erb_graphql_directive, unique int id: @erb_graphql_directive,
int child: @erb_token_code ref, int child: @erb_token_code ref
int loc: @location ref
); );
erb_output_directive_def( erb_output_directive_def(
unique int id: @erb_output_directive, unique int id: @erb_output_directive,
int child: @erb_token_code ref, int child: @erb_token_code ref
int loc: @location ref
); );
@erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content @erb_template_child_type = @erb_comment_directive | @erb_directive | @erb_graphql_directive | @erb_output_directive | @erb_token_content
@@ -1465,15 +1362,13 @@ erb_template_child(
); );
erb_template_def( erb_template_def(
unique int id: @erb_template, unique int id: @erb_template
int loc: @location ref
); );
erb_tokeninfo( erb_tokeninfo(
unique int id: @erb_token, unique int id: @erb_token,
int kind: int ref, int kind: int ref,
string value: string ref, string value: string ref
int loc: @location ref
); );
case @erb_token.kind of case @erb_token.kind of
@@ -1489,9 +1384,10 @@ case @erb_token.kind of
@erb_ast_node_parent = @erb_ast_node | @file @erb_ast_node_parent = @erb_ast_node | @file
#keyset[parent, parent_index] #keyset[parent, parent_index]
erb_ast_node_parent( erb_ast_node_info(
int child: @erb_ast_node ref, int node: @erb_ast_node ref,
int parent: @erb_ast_node_parent ref, int parent: @erb_ast_node_parent ref,
int parent_index: int ref int parent_index: int ref,
int loc: @location ref
); );