Show String outputs illegal escape sequence \& in string literals

Abierto
#258 7 comentarios 0 reacciones 0 asignados Ver en GitHub

Nadie ha tomado este issue todavía.

  • #293 de @JordanMartinez — cerrado sin fusionar

Evaluación

Dificultad
4/5
Tiempo estimado
3-5 días
Aptitud para principiantes
25/100
Tipo de issue
Error
Claridad
Bastante claro
Estado de actividad
Estancado
Stack tecnológico
haskell
Área
backend

Línea de trabajo

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.

Escrito por el modelo de indexación a partir del texto del issue.

Descripción

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

Lenguaje dominante
PureScript
Estrellas
168
Forks
90
Merge medio
3 d 1 h
PR fusionados (30 d)
1

Preparar el entorno

  • Sin Dockerfile ni archivo de Docker Compose
  • Tiene una plantilla de pull request
  • Sin guía de contribución

Primeros pasos

  1. Lee el issue completo y luego la guía de contribución del proyecto.
  2. Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
  3. Haz un fork del repositorio y trabaja en una rama.
  4. Abre un pull request que haga referencia al número del issue.

Más de purescript/purescript-prelude

Todos los issues de purescript/purescript-prelude

Issues similares

Más issues de Backend & API Design

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.