Hacktoberfest 2026: los issues que los mantenedores marcaron para octubre, abiertos y aptos para principiantes. Explorar issues de Hacktoberfest

editors: highlight complete hexadecimal and leading/trailing-dot numeric literals

Cerrado Apto para principiantes
#1,233 0 comentarios 0 reacciones 0 asignados Ver en GitHub

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

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

area:lint-tooling bug good first issue help wanted

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, and 1..
  • 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 5 within .5, and only 1 within 1.. The existing local runtime evaluates the four literals as 255, 16, 0.5, and 1.

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, and 1. 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

Abrir en Codespaces

Inicia el contenedor de desarrollo del proyecto en tu navegador, con tu propia cuenta de GitHub.

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 InauguralSystems/EigenScript

Todos los issues de InauguralSystems/EigenScript

Issues similares

Más issues de C

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.