Skip to content

C language is including ';' in expression syntax #380

@charles-gray

Description

@charles-gray

Describe the bug
When I try to use a hole with expression-like syntax (:[foo:e]) in C code, I see the ; semicolon character included in the expression. ; isn't a valid expression token in C.

Reproducing

This link showcases some examples of it matching the ; and some ways to break it.

bit.ly/3UNAuki

Expected behavior
I expect to be able to match an expression without the trailing semicolon.

Additional context
The same is true for the comma (,) token. Though that can be part of an expression depending on context. I'm not sure if I expect comby to be smart enough to tell the difference, so I'm not sure that's included in this bug report.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions