Skip to content

a path literal with a digit-leading first component fails to lex #32

Description

@wyattgill9
$ fix parse -E '/123abc'
error: parse error at 1:1: Unexpected token '/'.

$ nix-instantiate --parse -E '/123abc'
/123abc

Only the first component is affected. A digit-leading component anywhere else lexes fine:

$ fix parse -E '/a1'
{ "_type": "ExprLiteral", ... }

This shows up on content-addressed store paths written as path literals, so exposure grows as CA derivations spread. In the pinned nixpkgs corpus it is hit by lib/tests/modules/pathWith.nix:63.


fix 0.3.0 at 1f1a99cf, built -Doptimize=ReleaseSafe with Zig 0.16.0, darwin/aarch64. Reference implementation is Nix 2.34.8.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions