Skip to content

fix(queries:properties): proper numeric values#15281

Open
Rudxain wants to merge 1 commit intohelix-editor:masterfrom
Rudxain:fix-q-prop-num
Open

fix(queries:properties): proper numeric values#15281
Rudxain wants to merge 1 commit intohelix-editor:masterfrom
Rudxain:fix-q-prop-num

Conversation

@Rudxain
Copy link
Contributor

@Rudxain Rudxain commented Feb 9, 2026

Changes:

  • swap the precedence of float and integer so that integer has a chance to match. Previously, only float could match a value, because of its order and broadness
  • allow "+" as an optional prefix
  • allow empty integer part for floats (yes, -.1 is valid!)
  • fractional part can be arbitrary length
  • allow exponent for floats
  • allow unsigned hex integers

Unresolved questions:

  • should underscores be allowed?
  • should \d+. be considered float?
  • should infinity be considered float? if so, case-sensitive?

Important

The Java spec says "yes" to the first two, but that would make the regexes more complex, and I haven't fully tested it

Questions that I've answered to myself:

  • should hex floats be allowed? I'd say no, that's just too much
  • should NaN be a float? absolutely no, who would need that?

follow-up of #13874

@Rudxain Rudxain force-pushed the fix-q-prop-num branch 2 times, most recently from 32402e5 to 6d6f1f0 Compare February 9, 2026 14:59
@Rudxain Rudxain marked this pull request as ready for review February 9, 2026 15:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant