infosec-intern / vscode-yara

VSCode extension for the YARA pattern matching language
MIT License
63 stars 14 forks source link

Comments in grouping #73

Open codedninja opened 1 year ago

codedninja commented 1 year ago

Syntax highlight of comments inside of a grouping doesn't work. It thinks it's part of the grouping instead of a comment. Below it an example rule and what it looks like.

rule test {
    meta:
        author = "Author"
        description = "Description"

    strings:
        $instructions = {
            72 ?? ?? ?? ??  // IL_0000: ldstr
            80 ?? ?? 00 04  // IL_0005: stsfld
            (
                72 ?? ?? ?? ?? // Comment inside of a grouping

            )
        }

    condition:
        all of them

}

image