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

ruby-changes:56236

From: Nobuyoshi <ko1@a...>
Date: Thu, 27 Jun 2019 20:35:10 +0900 (JST)
Subject: [ruby-changes:56236] Nobuyoshi Nakada: 1f7cb4bee9 (trunk): Omit `EXPR_` prefix to show lex_state

https://git.ruby-lang.org/ruby.git/commit/?id=1f7cb4bee9

From 1f7cb4bee9f711d07a5b31f439f621a2557e7505 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Thu, 27 Jun 2019 17:18:24 +0900
Subject: Omit `EXPR_` prefix to show lex_state


diff --git a/parse.y b/parse.y
index 30f2696..38eab9c 100644
--- a/parse.y
+++ b/parse.y
@@ -10012,11 +10012,12 @@ new_regexp(struct parser_params *p, VALUE re, VALUE opt, const YYLTYPE *loc) https://github.com/ruby/ruby/blob/trunk/parse.y#L10012
 }
 #endif /* !RIPPER */
 
+
 #ifndef RIPPER
-static const char rb_parser_lex_state_names[][13] = {
-    "EXPR_BEG",    "EXPR_END",    "EXPR_ENDARG", "EXPR_ENDFN",  "EXPR_ARG",
-    "EXPR_CMDARG", "EXPR_MID",    "EXPR_FNAME",  "EXPR_DOT",    "EXPR_CLASS",
-    "EXPR_LABEL",  "EXPR_LABELED","EXPR_FITEM",
+static const char rb_parser_lex_state_names[][8] = {
+    "BEG",    "END",    "ENDARG", "ENDFN",  "ARG",
+    "CMDARG", "MID",    "FNAME",  "DOT",    "CLASS",
+    "LABEL",  "LABELED","FITEM",
 };
 
 static VALUE
@@ -10024,7 +10025,7 @@ append_lex_state_name(enum lex_state_e state, VALUE buf) https://github.com/ruby/ruby/blob/trunk/parse.y#L10025
 {
     int i, sep = 0;
     unsigned int mask = 1;
-    static const char none[] = "EXPR_NONE";
+    static const char none[] = "NONE";
 
     for (i = 0; i < EXPR_MAX_STATE; ++i, mask <<= 1) {
 	if ((unsigned)state & mask) {
-- 
cgit v0.10.2


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

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