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.
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 entirelocal.getgets a scope, whereas I'd like to highlightlocalandgetdifferently (I don't care so much about the.separator, but it should probably also receive its own scope). Or, ini32.addI want to highlighti32differently thanadd.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 isget $foo, and thelocalis (usually) implied by context. Similarly, ini32.addtheaddpart is what I want to read, whereas thei32is 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.