Skip to content

Allow 1 at identifier start. #183

Description

@python-processing-unit

According to the specification section 2.3:

The first character of an identifier MUST NOT be 0 or 1.

The first identifier character MAY be a letter A-Z or a-z, a decimal digit 2-9, or one of /, $, %, &, _, +, |, or ?. Subsequent identifier characters MAY additionally include the digits 0 and 1. This permissive ASCII-only character set preserves an unambiguous distinction between identifiers and numeric literals, which MUST begin with a 0-prefixed base marker.

However, numeric literals cannot start with 1 since the shift to based INT and FLT in version 0.6.0.

To reflect this, allow 1 at any point in an identifier.

Update the implementation, specification, tests, and stdlib.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Labels

documentationImprovements or additions to documentationenhancementNew feature or requestinterpreterRequires a code change in the interpreter.minorRequires a minor version change.testSomething related to the test suite.

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions