atom-language-julia icon indicating copy to clipboard operation
atom-language-julia copied to clipboard

Tokennize function parameters

Open GrayJack opened this issue 6 years ago • 2 comments

Tokennize function parameters/arguments so we can highlight like this python example:

2019-03-31-004715_grim

GrayJack avatar Mar 31 '19 03:03 GrayJack

Yes, it would be great if anything inside parentheses and before an equal sign was also tokenized this way, so that it work for both function calls and named tuples. The token name could be something like variable.parameter (which is what python uses) or formal-arg. Here's a screenshot of some Python code:

Screen Shot 2020-11-15 at 11 11 57 AM

I would like to be able to update my color theme to make formal args brown like in the Python version of my color theme.

So to summarize, this would tokenize all arguments in a function declaration as formal-arg and it would also tokenize all keyword argument names in function calls and named tuple "calls". However, to be clear, it would not tokenize variables passed to function calls like x=1; foo(x), since in that case x is a variable rather than a formal argument.

CameronBieganek avatar Nov 15 '20 17:11 CameronBieganek

That does seem doable. I wanted to rework our function arg handling anyways, so that seems like a addition.

pfitzseb avatar Nov 15 '20 19:11 pfitzseb