From 2b50e1778b164e641c03c2e77176b6f47ca1e278 Mon Sep 17 00:00:00 2001 From: nsfisis Date: Sat, 18 Mar 2023 15:47:05 +0900 Subject: refactor: add RawHTML type to represent text node not being escaped --- .../2021-10-02/ruby-then-keyword-and-case-in/index.html | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html') diff --git a/public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html b/public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html index 25fb3bb..c027417 100644 --- a/public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html +++ b/public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html @@ -119,11 +119,11 @@ a 次のような構文エラーが出力される。

-
20:1: syntax error, unexpected local variable or method, expecting `then' or ';' or '\n'
-if true puts 'Hello, World!' end
+            
20:1: syntax error, unexpected local variable or method, expecting `then' or ';' or '\n'
+if true puts 'Hello, World!' end
         ^~~~
-20:1: syntax error, unexpected `end', expecting end-of-input
-...f true puts 'Hello, World!' end
+20:1: syntax error, unexpected `end', expecting end-of-input +...f true puts 'Hello, World!' end

二つ目のメッセージは無視して一つ目を読むと、then;か改行が来るはずのところ変数だかメソッドだかが現れたことによりエラーとなっているようだ。 @@ -182,7 +182,7 @@ b https://github.com/ruby/ruby/blob/221ca0f8281d39f0dfdfe13b2448875384bbf735/parse.y#L3961-L3986

-
p_case_body : keyword_in
+            
p_case_body : keyword_in
   {
   SET_LEX_STATE(EXPR_BEG|EXPR_LABEL);
   p->command_start = FALSE;
@@ -213,7 +213,7 @@ b
               簡略版:
             

-
p_case_body : keyword_in p_top_expr then compstmt p_cases
+            
p_case_body : keyword_in p_top_expr then compstmt p_cases
 ;

-- cgit v1.2.3-70-g09d2