Skip to content

Incorrect suffix highlighting for numeric literals in C-like languages #684

Description

@yanchith

Describe the bug

Set language to C and type in literal 1l. The "l" is not highlit. (If you type 10l, it is highlit)

Image

This is because the C tokenizer doesn't attempt to parse suffixes unless there's more than one number-or-decimal-point in the input.

I discovered this when making syntax highlighting for my own editor (using Focus as a reference). I am happy to send a pull request.

Activity

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

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