From 859634493ef4aff43cb0d381ec93056be4a63979 Mon Sep 17 00:00:00 2001 From: Benjamin Bannier Date: Fri, 10 Feb 2023 18:53:32 +0100 Subject: [PATCH] Rename `init_class` to `init_node` The previous name sounded a lot like a class initializer which this is not. --- corpus/test | 14 +++++++------- grammar.js | 4 ++-- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/corpus/test b/corpus/test index d742df1..cd6e014 100644 --- a/corpus/test +++ b/corpus/test @@ -34,7 +34,7 @@ function foo() (var_decl (id) (initializer - (init_class) + (init_kind) (init (expr (constant @@ -42,7 +42,7 @@ function foo() (var_decl (id) (initializer - (init_class) + (init_kind) (init (expr (constant @@ -50,7 +50,7 @@ function foo() (option_decl (id) (initializer - (init_class) + (init_kind) (init (expr (constant @@ -58,7 +58,7 @@ function foo() (const_decl (id) (initializer - (init_class) + (init_kind) (init (expr (constant @@ -93,7 +93,7 @@ function foo() (var_decl (id) (initializer - (init_class) + (init_kind) (init (expr (constant @@ -112,7 +112,7 @@ global y = r?$a; (var_decl (id) (initializer - (init_class) + (init_kind) (init (expr (field_access @@ -122,7 +122,7 @@ global y = r?$a; (var_decl (id) (initializer - (init_class) + (init_kind) (init (expr (field_check diff --git a/grammar.js b/grammar.js index 0dfd2e3..3e4c910 100644 --- a/grammar.js +++ b/grammar.js @@ -170,11 +170,11 @@ module.exports = grammar({ type_spec: $ => seq($.id, ':', $.type, optional($.attr_list), ';'), initializer: $ => seq( - optional($.init_class), + optional($.init_kind), $.init, ), - init_class: _ => prec_r(choice('=', '+=', '-=')), + init_kind: _ => prec_r(choice('=', '+=', '-=')), init: $ => choice( seq('{', optional(list1($.expr, ',', true)), '}'),