Why define a hash function when strict: false? #6

Closed
opened 2024-04-23 23:23:46 +02:00 by AlexErrant · 1 comment
AlexErrant commented 2024-04-23 23:23:46 +02:00 (Migrated from github.com)

github.com/lezer-parser/xml@331ab3dd94/src/tokens.js (L51-L52)

The hash documentation states:

Only needed for strict contexts.

Since we're not in a strict context, why define a hash function?

https://github.com/lezer-parser/xml/blob/331ab3dd94446f3b2594e71e8ff68be57c2e33a4/src/tokens.js#L51-L52 [The `hash` documentation](https://lezer.codemirror.net/docs/ref/#lr.ContextTracker.constructor^spec.hash) states: > Only needed for strict contexts. Since we're _not_ in a strict context, why define a `hash` function?
marijnh commented 2024-04-24 08:09:18 +02:00 (Migrated from github.com)

That seems to be leftover and indeed, entirely unused. Attached patches remove it.

That seems to be leftover and indeed, entirely unused. Attached patches remove it.
Sign in to join this conversation.
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
lezer/xml#6
No description provided.