Handle type-closing chevrons adjacent to an initializer assignment
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Aptitud para principiantes
- 45/100
Línea de trabajo
Start with type parsing in front/parser/src/parser/types.rs and storage declarations in front/parser/src/parser/decl.rs, then inspect the lexer’s compound-operator handling. Reproduce with array<i32,1>=[1] and ptr<i32>=null while comparing the spaced forms and genuine >=/>> expressions. Done means the agreed compact-or-spaced policy is consistent across the listed generic types, diagnostics identify the exact boundary when rejected, AST/HIR behavior is equivalent for accepted forms, and source spans remain accurate.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
Problem
A storage declaration using array<i32,1>=[1] or ptr<i32>=null fails while the same declaration with whitespace between > and = succeeds. The diagnostic consumes past the chevron/operator boundary and says a semicolon is missing, rather than explaining the actual boundary problem.
Starting points: type parsing, storage declarations, and the lexer compound-operator handling. This differs from the error-message preservation work in #971 and nested generic comma/chevron tests in #393.
Reproduction
Audited canonical master 540728c2eb6cc12f5c69c3fb3fdb96e07ba059a4 on Linux amd64 with a checkout-built Wave 0.0.1-alpha-dev, matching checkout std, Rust 1.89.0 and LLVM 21.1.8. Both check and build --emit=ir, with --error-format=json, reject:
fun main() {
var a: array<i32,1>=[1];
var p: ptr<i32>=null;
}
array<i32,1> = [1] and ptr<i32> = null are accepted controls. The errors are expected ';' in storage declaration; the pointer case highlights null, after the problematic boundary.
Scope
Resolve the type/assignment token boundary in its parsing context, retaining correct spans for any split tokens. Keep actual expression >=, >> and compound shifts unchanged. If the language intentionally requires whitespace here, document that choice and issue a boundary-specific diagnostic instead of the misleading semicolon error.
Please mention @LunaStev to discuss the design before starting implementation.
Completion criteria
- The agreed policy is consistent for pointer, array, nested generic and ordinary named generic types.
- Accepted compact/spaced forms have equivalent AST/HIR, or intentionally rejected forms identify the exact boundary with actionable help.
- Genuine comparison/shift operators retain maximal-munch expression behavior; human/JSON source ranges remain accurate.
- Lenguaje dominante
- Rust
- Estrellas
- 56
- Forks
- 21
- Merge medio
- 23 h 20 min
- PR fusionados (30 d)
- 45
Preparar el entorno
Primeros pasos
- Lee el issue completo y luego la guía de contribución del proyecto.
- Comenta en el issue que vas a ocuparte — evita que dos personas hagan lo mismo.
- Haz un fork del repositorio y trabaja en una rama.
- Abre un pull request que haga referencia al número del issue.
Más de wavefnd/Wave
-
Reject unrepresentable POSIX listener descriptors before Unix-domain acceptPosiblemente ocupada @ShahadatTest la tomó hace 6 días. Abiertobug good first issue
Dificultad 2/5 1-3 horas Aptitud para principiantes 84/100
wavefnd/Wave#1082 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Preserve expression assembly result types when recording HIR conversionsPosiblemente ocupada @hiyouwhatsapp la tomó hace 2 días. Abiertobug help wanted
Dificultad 5/5 Más de una semana Aptitud para principiantes 35/100
Los mantenedores suelen responder en 1 día
-
bug help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 53/100
Los mantenedores suelen responder en 1 día
-
Preserve the previous build output when writing its Cargo receipt failsPosiblemente ocupada @hiyouwhatsapp la tomó hace 2 días. Abiertobug build help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 56/100
Los mantenedores suelen responder en 1 día
-
Reconcile obsolete staging assets before verifying a new Nightly generationPosiblemente ocupada @hiyouwhatsapp la tomó hace 2 días. Abiertobug ci help wanted
Dificultad 4/5 3-5 días Aptitud para principiantes 48/100
Los mantenedores suelen responder en 1 día
Todos los issues de wavefnd/Wave
Issues similares
-
bug priority: medium
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
storytold/photocraft#12706 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 68/100
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 85/100
IngvarConsulting/unica#2822 ·
Los mantenedores suelen responder en 1 día
-
bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
-
Clean master build fails in zune-jpeg error conversion and zero-IV array construction (patch)Abierto
Dificultad 2/5 1-3 horas Aptitud para principiantes 72/100