Skip to content

Should 5.f parse as a float literal, or expr_field(int literal, "f")? #1306

Closed
@marijnh

Description

@marijnh

We can make the lexer not consider a dot part of a number when followed immediately by a letter. This makes 5.f, 10.f64, and similar invalid, but the dot is already redundant there anyway.

This allows us to do 10.some_method_name(). That'd be a relatively rare thing to write, but allowing it is nice, and it removes some kludgy code from the pretty-printer.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions