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

Remove LPAREN and RPAREN from TokenParser. #2040

Merged
merged 1 commit into from
Jan 25, 2022

Conversation

nojaf
Copy link
Contributor

@nojaf nojaf commented Jan 25, 2022

Similar to #2035 and #2033.

@baronfel
Copy link
Contributor

it's really great to see how the syntax tree additions are reducing the amount of token-based workarounds you had before. much clearer this way, in my opinion!

@nojaf
Copy link
Contributor Author

nojaf commented Jan 25, 2022

Yup, I really want to get rid of

let private tokenNames =
[ "EQUALS"
"BAR"
"TRY"
"FINALLY"
"WITH"
"MEMBER"
"AND_BANG"
"IN" ]

These are all the trivia anchors found in the tokens, each time we want to use one of those, we need to construct an estimated range and wing it CodePrinter. So much easier if they are in the tree.

Equals and With are tackled in the next FCS.

@nojaf nojaf merged commit 0609000 into fsprojects:master Jan 25, 2022
@nojaf nojaf deleted the remove-paren-tokens branch January 25, 2022 19:04
jindraivanek pushed a commit to jindraivanek/fantomas that referenced this pull request Mar 30, 2022
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

Successfully merging this pull request may close these issues.

2 participants