Skip to content

Support different scopes for instruction and their "namespace" #7

@vrugtehagel

Description

@vrugtehagel

I think it'd be nice if instructions and their "namespace" (and the separator) would get different scopes, so we can highlight them differently. For example, when doing local.get $foo, the entire local.get gets a scope, whereas I'd like to highlight local and get differently (I don't care so much about the . separator, but it should probably also receive its own scope). Or, in i32.add I want to highlight i32 differently than add.

The use case is that, when quickly skimming over WAST, then the namespaces are not particularly important to the actual logic, so I want to highlight them in a dimmer color. E.g. in local.get $foo, the important bit is get $foo, and the local is (usually) implied by context. Similarly, in i32.add the add part is what I want to read, whereas the i32 is only really relevant when using different types in close proximity, which is not usually the case.

Happy to open a PR for this, if you're interested.

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