You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
@bbatsov We have a number of similar problems with function names or keywords appearing in resource parameters.
I don't think that we can reasonably solve these without bloating our font-lock keywords with restrictions on keywords (e.g. name followed by parenthesis), or making a great effort to turn our font lock keywords into some stateful analyser that takes the context into account.
At best, we could go through the list of all builtin functions again, compile a list of all rvalue functions, and change our keywords to require a subsequent parenthesis for all of these functions. That's not particularly difficult and would fix this problem, but given that there are about 50 built-in functions, it'd take a bit of time, and it's a boring task.
We use more or less the same technique (checking if function names are followed by params if they require any) in ruby-mode to differentiate between some built-in methods and regular variable names. While not terribly important I guess it should be done at some point or another.
Consider this:
file
inensure => file
gets font-locked as a built-in (I guess it's confused with thefile
built-in function), but it shouldn't.The text was updated successfully, but these errors were encountered: