liquid-java / liquid-java/liquidjava
State Names should be able to start with UpperCase
Nadie ha tomado este issue todavía.
- Lenguaje dominante
- Java
- Estrellas
- 67
- Forks
- 36
- Merge medio
- 10 d 18 h
- PR fusionados (30 d)
- 3
Descripción
Why
There is some confusion about what can be written in uppercase and lowercase, and we only defined that in the Grammar.
During the user study, some participants started writing the state names capitalized (i.e., first letter Upper Case and the remaining in lower case). However, the current grammar does not allow it since capitalization is reserved for Alias.
Maybe it would make sense to allow both types to be capitalized specially since we got different annotation for each that serve as syntax sugar but help desambiguate.
Example
@StateSet({"Uninitialized", "Initialized"})
public class SM1 {
@StateRefinement(to="Uninitialized(this)")
public SM1() {}
@StateRefinement(from="Uninitialized(this)", to="Initialized(this)")
public void initialize() {}
}
...
public static void main(String[] args) {
SM1 sm1 = new SM1();
sm1.initialize(); //Error
}
The states are capitalized so they are handled as alias which should not be the correct behavior.
Steps
- Allow in the grammar that states can be capital (confirm if it is needed).
- When parsing the refinements AST make sure the capitalized states are treated as such and not as alias.
- Test with examples.
Current Approach
Check if any of the state names provided starts with uppercase - if so, immediately return with an error.
Guía de contribución
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.
Línea de trabajo
Comienza localizando la gramática y el refinements AST parser, y luego sigue cómo se clasifican actualmente los nombres de estado con mayúscula como alias. Ejecuta los ejemplos descritos en el issue y añade o actualiza pruebas que cubran tanto los estados con mayúscula como los alias. El trabajo estará terminado cuando los nombres de estado con mayúscula válidos se analicen como estados sin romper el manejo de alias.
Escrito por el modelo de indexación a partir del texto del issue.
Evaluación
- Stack tecnológico
- java
- Área
- compilers
- Tipo de issue
- Nueva funcionalidad
- Dificultad
- 4/5
- Tiempo estimado
- 3-5 días
- Estado de actividad
- Estancado
- Claridad
- Bastante claro
- Aptitud para principiantes
- 35/100