Show String outputs illegal escape sequence \& in string literals

オープン
#258 コメント 7 件 リアクション 0 件 担当者 0 名 GitHub で見る

まだ誰も着手していません。

  • #293 @JordanMartinez による — マージされずにクローズ

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
25/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
haskell
領域
backend

調査の方向性

The issue describes a mismatch between REPL output and compiler input, but names no files or tests. Start by locating the string literal escape parser and the REPL string rendering code, then trace how numeric escapes are parsed. Done means the compiler accepts the zero-width escape used in REPL output; the issue gives no specific test command.

索引モデルが issue の本文から書いたものです。

説明

purs-0.15 type: breaking change type: bug

Description

The REPL outputs string literals containing the escape sequence \& but this escape sequence is not accepted as input.

To Reproduce

In the REPL:

> "\x0000001"
"\0\&1"

> "\0\&1"
Illegal character escape code at line 1, column 3

Expected behavior

The REPL outputs valid string literals.

Additional context

Haskell supports \& to delimit a numeric escape sequence from the following characters, see The zero-width escape sequence. This is exactly the way in which the PureScript REPL uses \& to produce canonicalized string literals. However the compiler does not actually accept this escape sequence. If it did this would provide a solution to the problem in purescript/purescript#3750.

PureScript version

0.13.8

主要言語
PureScript
スター
168
フォーク
90
平均マージ
3日 1時間
マージ済み PR(30日)
1

環境構築

  • Dockerfile・Docker Compose ファイルなし
  • プルリクエストのテンプレートあり
  • コントリビューションガイドなし

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

purescript/purescript-prelude のほかの issue

purescript/purescript-prelude の issue をすべて見る

似ている issue

Backend & API Design の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。