Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tokennize function parameters #180

Open
GrayJack opened this issue Mar 31, 2019 · 2 comments
Open

Tokennize function parameters #180

GrayJack opened this issue Mar 31, 2019 · 2 comments
Assignees

Comments

@GrayJack
Copy link
Contributor

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

2019-03-31-004715_grim

@CameronBieganek
Copy link

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.

@pfitzseb
Copy link
Collaborator

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

@pfitzseb pfitzseb self-assigned this Nov 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants