scala.tmbundle
scala.tmbundle copied to clipboard
language grammar misses primitive types in parameter lists
In the language grammar the following language rule is defined in such a way that it misses primitive types inside the parameter list and scopes them as an entity.name.class instead
parameter-list = {
patterns = (
{ match = '([a-zA-Z$_][a-zA-Z0-9$_]*)\s*:\s*([A-Za-z0-9][\w|_|?|\.]*)?,?';
captures = {
1 = { name = 'variable.parameter'; };
2 = { name = 'entity.name.class'; };
};
},
);
};
I'm pretty sure that the way to fix this involves using
begin = '\(';
end = '\)';
and then recursively calling the storage and other language rules but I've no idea how to do that!
Hi Jay,
Yes I think you're right and there's probably room for improvements here. It would require quite a lot of testing though to make sure that it didn't break any highlighting so will have to wait for a day where I have more time :)
You can see how to apply rules recursively in 'block-comments' if you want to take a whack at it yourself.