[前][次][番号順一覧][スレッド一覧]

ruby-changes:73933

From: yui-knk <ko1@a...>
Date: Sat, 8 Oct 2022 23:29:52 +0900 (JST)
Subject: [ruby-changes:73933] 8483737bbf (master): Fix typos

https://git.ruby-lang.org/ruby.git/commit/?id=8483737bbf

From 8483737bbfff506996777991f8dca7f45ce422d5 Mon Sep 17 00:00:00 2001
From: yui-knk <spiketeika@g...>
Date: Sat, 8 Oct 2022 21:04:23 +0900
Subject: Fix typos

---
 parse.y | 74 ++++++++++++++++++++++++++++++++---------------------------------
 1 file changed, 37 insertions(+), 37 deletions(-)

diff --git a/parse.y b/parse.y
index 8f3bca0873..3f0eb54d4e 100644
--- a/parse.y
+++ b/parse.y
@@ -355,8 +355,8 @@ struct parser_params { https://github.com/ruby/ruby/blob/trunk/parse.y#L355
     VALUE error_buffer;
     VALUE debug_lines;
     const struct rb_iseq_struct *parent_iseq;
-    /* store specific keyword localtions to generate dummy end token */
-    VALUE end_expect_token_localtions;
+    /* store specific keyword locations to generate dummy end token */
+    VALUE end_expect_token_locations;
 #else
     /* Ripper only */
 
@@ -414,36 +414,36 @@ pop_pktbl(struct parser_params *p, st_table *tbl) https://github.com/ruby/ruby/blob/trunk/parse.y#L414
 static void flush_debug_buffer(struct parser_params *p, VALUE out, VALUE str);
 
 static void
-debug_end_expect_token_localtions(struct parser_params *p, const char *name)
+debug_end_expect_token_locations(struct parser_params *p, const char *name)
 {
     if(p->debug) {
         VALUE mesg = rb_sprintf("%s: ", name);
-        rb_str_catf(mesg, " %"PRIsVALUE"\n", p->end_expect_token_localtions);
+        rb_str_catf(mesg, " %"PRIsVALUE"\n", p->end_expect_token_locations);
         flush_debug_buffer(p, p->debug_output, mesg);
     }
 }
 
 static void
-push_end_expect_token_localtions(struct parser_params *p, const rb_code_position_t *pos)
+push_end_expect_token_locations(struct parser_params *p, const rb_code_position_t *pos)
 {
-    if(NIL_P(p->end_expect_token_localtions)) return;
-    rb_ary_push(p->end_expect_token_localtions, rb_ary_new_from_args(2, INT2NUM(pos->lineno), INT2NUM(pos->column)));
-    debug_end_expect_token_localtions(p, "push_end_expect_token_localtions");
+    if(NIL_P(p->end_expect_token_locations)) return;
+    rb_ary_push(p->end_expect_token_locations, rb_ary_new_from_args(2, INT2NUM(pos->lineno), INT2NUM(pos->column)));
+    debug_end_expect_token_locations(p, "push_end_expect_token_locations");
 }
 
 static void
-pop_end_expect_token_localtions(struct parser_params *p)
+pop_end_expect_token_locations(struct parser_params *p)
 {
-    if(NIL_P(p->end_expect_token_localtions)) return;
-    rb_ary_pop(p->end_expect_token_localtions);
-    debug_end_expect_token_localtions(p, "pop_end_expect_token_localtions");
+    if(NIL_P(p->end_expect_token_locations)) return;
+    rb_ary_pop(p->end_expect_token_locations);
+    debug_end_expect_token_locations(p, "pop_end_expect_token_locations");
 }
 
 static VALUE
-peek_end_expect_token_localtions(struct parser_params *p)
+peek_end_expect_token_locations(struct parser_params *p)
 {
-    if(NIL_P(p->end_expect_token_localtions)) return Qnil;
-    return rb_ary_last(0, 0, p->end_expect_token_localtions);
+    if(NIL_P(p->end_expect_token_locations)) return Qnil;
+    return rb_ary_last(0, 0, p->end_expect_token_locations);
 }
 #endif
 
@@ -3353,7 +3353,7 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/parse.y#L3353
 		  f_arglist
 		    {
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		  bodystmt
@@ -3370,7 +3370,7 @@ primary		: literal https://github.com/ruby/ruby/blob/trunk/parse.y#L3370
 		  f_arglist
 		    {
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		  bodystmt
@@ -3426,7 +3426,7 @@ k_begin		: keyword_begin https://github.com/ruby/ruby/blob/trunk/parse.y#L3426
 		    {
 			token_info_push(p, "begin", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3446,7 +3446,7 @@ k_if		: keyword_if https://github.com/ruby/ruby/blob/trunk/parse.y#L3446
 			    }
 			}
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3455,7 +3455,7 @@ k_unless	: keyword_unless https://github.com/ruby/ruby/blob/trunk/parse.y#L3455
 		    {
 			token_info_push(p, "unless", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3464,7 +3464,7 @@ k_while		: keyword_while https://github.com/ruby/ruby/blob/trunk/parse.y#L3464
 		    {
 			token_info_push(p, "while", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3473,7 +3473,7 @@ k_until		: keyword_until https://github.com/ruby/ruby/blob/trunk/parse.y#L3473
 		    {
 			token_info_push(p, "until", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3482,7 +3482,7 @@ k_case		: keyword_case https://github.com/ruby/ruby/blob/trunk/parse.y#L3482
 		    {
 			token_info_push(p, "case", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3491,7 +3491,7 @@ k_for		: keyword_for https://github.com/ruby/ruby/blob/trunk/parse.y#L3491
 		    {
 			token_info_push(p, "for", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3501,7 +3501,7 @@ k_class		: keyword_class https://github.com/ruby/ruby/blob/trunk/parse.y#L3501
 			token_info_push(p, "class", &@$);
 			$<ctxt>$ = p->ctxt;
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3511,7 +3511,7 @@ k_module	: keyword_module https://github.com/ruby/ruby/blob/trunk/parse.y#L3511
 			token_info_push(p, "module", &@$);
 			$<ctxt>$ = p->ctxt;
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3527,7 +3527,7 @@ k_do		: keyword_do https://github.com/ruby/ruby/blob/trunk/parse.y#L3527
 		    {
 			token_info_push(p, "do", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 
 		    }
@@ -3537,7 +3537,7 @@ k_do_block	: keyword_do_block https://github.com/ruby/ruby/blob/trunk/parse.y#L3537
 		    {
 			token_info_push(p, "do", &@$);
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		;
@@ -3586,7 +3586,7 @@ k_end		: keyword_end https://github.com/ruby/ruby/blob/trunk/parse.y#L3586
 		    {
 			token_info_pop(p, "end", &@$);
 		    /*%%%*/
-			pop_end_expect_token_localtions(p);
+			pop_end_expect_token_locations(p);
 		    /*% %*/
 		    }
 		| tDUMNY_END
@@ -3960,7 +3960,7 @@ lambda_body	: tLAMBEG compstmt '}' https://github.com/ruby/ruby/blob/trunk/parse.y#L3960
 		| keyword_do_LAMBDA
 		    {
 		    /*%%%*/
-			push_end_expect_token_localtions(p, &@1.beg_pos);
+			push_end_expect_token_locations(p, &@1.beg_pos);
 		    /*% %*/
 		    }
 		  bodystmt k_end
@@ -9331,12 +9331,12 @@ parse_ident(struct parser_params *p, int c, int cmd_state) https://github.com/ruby/ruby/blob/trunk/parse.y#L9331
     }
 
 #ifndef RIPPER
-    if (!NIL_P(peek_end_expect_token_localtions(p))) {
+    if (!NIL_P(peek_end_expect_token_locations(p))) {
 	VALUE end_loc;
 	int lineno, column;
 	int beg_pos = (int)(p->lex.ptok - p->lex.pbeg);
 
-	end_loc = peek_end_expect_token_localtions(p);
+	end_loc = peek_end_expect_token_locations(p);
 	lineno = NUM2INT(rb_ary_entry(end_loc, 0));
 	column = NUM2INT(rb_ary_entry(end_loc, 1));
 
@@ -9452,8 +9452,8 @@ parser_yylex(struct parser_params *p) https://github.com/ruby/ruby/blob/trunk/parse.y#L9452
       case -1:			/* end of script. */
 	p->eofp  = 1;
 #ifndef RIPPER
-	if (!NIL_P(p->end_expect_token_localtions) && RARRAY_LEN(p->end_expect_token_localtions) > 0) {
-	    pop_end_expect_token_localtions(p);
+	if (!NIL_P(p->end_expect_token_locations) && RARRAY_LEN(p->end_expect_token_locations) > 0) {
+	    pop_end_expect_token_locations(p);
 	    return tDUMNY_END;
 	}
 #endif
@@ -13322,7 +13322,7 @@ parser_initialize(struct parser_params *p) https://github.com/ruby/ruby/blob/trunk/parse.y#L13322
     p->parsing_thread = Qnil;
 #else
     p->error_buffer = Qfalse;
-    p->end_expect_token_localtions = Qnil;
+    p->end_expect_token_locations = Qnil;
 #endif
     p->debug_buffer = Qnil;
     p->debug_output = rb_ractor_stdout();
@@ -13351,7 +13351,7 @@ parser_mark(void *ptr) https://github.com/ruby/ruby/blob/trunk/parse.y#L13351
     rb_gc_mark(p->debug_lines);
     rb_gc_mark(p->compile_option);
     rb_gc_mark(p->error_buffer);
-    rb_gc_mark(p->end_expect_token_localtions);
+    rb_gc_mark(p->end_expect_token_locations);
 #else
     rb_gc_mark(p->delayed.token);
     rb_gc_mark(p->value);
@@ -13464,7 +13464,7 @@ rb_parser_error_tolerant(VALUE vparser) https://github.com/ruby/ruby/blob/trunk/parse.y#L13464
 
     TypedData_Get_Struct(vparser, struct parser_params, &parser_data_type, p);
     p->error_tolerant = 1;
-    p->end_expect_token_localtions = rb_ary_new();
+    p->end_expect_token_locations = rb_ary_new();
 }
 
 #endif
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]