diff options
| author | nsfisis <nsfisis@gmail.com> | 2023-03-18 15:47:05 +0900 |
|---|---|---|
| committer | nsfisis <nsfisis@gmail.com> | 2023-03-18 15:47:05 +0900 |
| commit | 2b50e1778b164e641c03c2e77176b6f47ca1e278 (patch) | |
| tree | 3fa48f5c5c3c2b9d8753ce82d438aa2523856660 /public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html | |
| parent | 4ce1f674055ac1dd1c4864f366aac212f5643248 (diff) | |
| download | blog.nsfisis.dev-2b50e1778b164e641c03c2e77176b6f47ca1e278.tar.gz blog.nsfisis.dev-2b50e1778b164e641c03c2e77176b6f47ca1e278.tar.zst blog.nsfisis.dev-2b50e1778b164e641c03c2e77176b6f47ca1e278.zip | |
refactor: add RawHTML type to represent text node not being escaped
Diffstat (limited to 'public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html')
| -rw-r--r-- | public/posts/2021-10-02/ruby-then-keyword-and-case-in/index.html | 12 |
1 files changed, 6 insertions, 6 deletions
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 次のような構文エラーが出力される。 </p> - <pre class="monospaced highlight"><code>20:1: syntax error, unexpected local variable or method, expecting `then' or ';' or '\n' -if true puts 'Hello, World!' end + <pre class="highlight monospaced"><code>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</code></pre> +20:1: syntax error, unexpected `end', expecting end-of-input +...f true puts 'Hello, World!' end</code></pre> <p> 二つ目のメッセージは無視して一つ目を読むと、<code>then</code>か<code>;</code>か改行が来るはずのところ変数だかメソッドだかが現れたことによりエラーとなっているようだ。 @@ -182,7 +182,7 @@ b <a href="https://github.com/ruby/ruby/blob/221ca0f8281d39f0dfdfe13b2448875384bbf735/parse.y#L3961-L3986">https://github.com/ruby/ruby/blob/221ca0f8281d39f0dfdfe13b2448875384bbf735/parse.y#L3961-L3986</a> </p> - <pre class="highlight" language="yacc" linenumbering="unnumbered"><code class="highlight">p_case_body : keyword_in + <pre class="highlight" language="yacc" linenumbering="unnumbered"><code>p_case_body : keyword_in { SET_LEX_STATE(EXPR_BEG|EXPR_LABEL); p->command_start = FALSE; @@ -213,7 +213,7 @@ b 簡略版: </p> - <pre class="highlight" language="yacc" linenumbering="unnumbered"><code class="highlight">p_case_body : keyword_in p_top_expr then compstmt p_cases + <pre class="highlight" language="yacc" linenumbering="unnumbered"><code>p_case_body : keyword_in p_top_expr then compstmt p_cases ;</code></pre> <p> |
