editors: highlight complete hexadecimal and leading/trailing-dot numeric literals
Los mantenedores suelen responder en 1 día
Nadie ha tomado este issue todavía.
Evaluación
- Dificultad
- 2/5
- Tiempo estimado
- 1-3 horas
- Aptitud para principiantes
- 88/100
- Tipo de issue
- Error
- Claridad
- Bien especificado
- Estado de actividad
- Activo
- Stack tecnológico
- vim, vscode
- Área
- developer-experience, tooling
Línea de trabajo
Comienza con editors/vscode/syntaxes/eigenscript.tmLanguage.json y editors/vim/syntax/eigenscript.vim, luego lee la sección de números de docs/SPEC.md y ejecuta la prueba de patrones de Node proporcionada. Se considera terminado cuando ambas gramáticas resalten literales hexadecimales completos y literales con punto inicial o final, conservando el comportamiento de decimales, exponentes, cadenas, comentarios e identificadores; incluye una verificación reproducible de los scopes antes y después.
Escrito por el modelo de indexación a partir del texto del issue.
Descripción
EigenScript accepts hexadecimal integers and leading/trailing-dot decimals, but the bundled VS Code and Vim syntax grammars do not highlight the complete literals.
This is a small first contribution for someone comfortable with regular expressions. It does not require changing the language runtime.
Evidence
Checked at b91768e23c5a874a64e76e4af9ab291e6aa49983:
- Language contract: numbers explicitly accepts
0xFF,0X10,.5, and1.. - VS Code number pattern and Vim number pattern cover decimal digits with an optional fractional part and exponent.
- Running the exact VS Code pattern in Node matches neither hex literal, only
5within.5, and only1within1.. The existing local runtime evaluates the four literals as255,16,0.5, and1.
The pattern-level probe can be repeated from the repository root:
node -e 'const g=require("./editors/vscode/syntaxes/eigenscript.tmLanguage.json"); const r=new RegExp(g.repository.numbers.match,"g"); for(const s of ["0xFF","0X10",".5","1.","1.25","1e5"]) console.log(s,JSON.stringify(s.match(r)));'
This evidence is a grammar-level check, not a claim of GUI verification. VS Code semantic tokens from eigenlsp can mask a TextMate grammar defect; check the grammar with the language server disabled when reviewing the fix.
Scope
Update the numeric rules in the two files above to match the existing lexer/spec. Keep runtime parsing and numeric semantics unchanged. Hexadecimal floating-point syntax is not supported by EigenScript and should not be introduced here.
Done when
-
0xFF,0X10,.5, and1.are highlighted over their complete token spans in both editors. - Ordinary integers, decimal fractions, and scientific notation still work, including exponent signs.
- Strings and comments retain their own scopes, and identifiers containing digits are not partially highlighted as numbers.
- The PR includes a small before/after verification fixture or reproducible scope inspection for both grammars. Show that the old rules fail the new cases.
Start with the two grammar files and docs/SPEC.md's numbers section. Follow CONTRIBUTING.md for the normal PR checks. Other editor issues may touch the same files; keep this PR focused on numbers and rebase if needed.
- Lenguaje dominante
- C
- Estrellas
- 3
- Forks
- 7
- Merge medio
- 4 h 15 min
- PR fusionados (30 d)
- 106
Preparar el entorno
Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.
- Incluye un Dockerfile o un archivo de Docker Compose
- Tiene una plantilla de pull request
- Leer la 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.
Más de InauguralSystems/EigenScript
-
area:lint-tooling bug
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1340 ·
Los mantenedores suelen responder en 1 día
-
area:stdlib found-by:code-review kind:silent-wrong
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
InauguralSystems/EigenScript#1338 ·
Los mantenedores suelen responder en 1 día
-
area:lint-tooling found-by:critic kind:docs-drift
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100
InauguralSystems/EigenScript#1335 ·
Los mantenedores suelen responder en 1 día
-
area:ci found-by:critic kind:gate-defect
Dificultad 2/5 1-3 horas Aptitud para principiantes 86/100
InauguralSystems/EigenScript#1311 ·
Los mantenedores suelen responder en 1 día
-
enrolment: decide test_gc_runner_controls.py (exempt vs enrol) and whether floors need a ratchetAbiertoarea:gates found-by:critic kind:decision
Dificultad 2/5 1-3 horas Aptitud para principiantes 65/100
InauguralSystems/EigenScript#1280 · 1 comentario ·
Los mantenedores suelen responder en 1 día
Todos los issues de InauguralSystems/EigenScript
Issues similares
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 88/100
ARM-software/sysarch-acs#556 · 1 comentario ·
-
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 78/100
Los mantenedores suelen responder en 1 día
-
bug needs triage
Dificultad 2/5 1-3 horas Aptitud para principiantes 78/100
netdata/netdata#24062 · 1 comentario ·
Los mantenedores suelen responder en 1 día
-
Dificultad 2/5 1-3 horas Aptitud para principiantes 76/100