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

a fix to indentation related to comma syntax #17

Merged
merged 1 commit into from
Mar 12, 2021
Merged

a fix to indentation related to comma syntax #17

merged 1 commit into from
Mar 12, 2021

Conversation

tiye
Copy link
Member

@tiye tiye commented Mar 12, 2021

Normally we can write:

a b c d e

with comma syntax, since the essence of comma syntax actually increase a level of indentation, it could become

a
 , b c d e

then again, it could be:

a
  , b
  , c d e

or also(counter-intuitively):

a
  , b
    , c d e

and even:

a
  , b
    , c
      , d
        , e

while it still parses to:

[["a" "b" "c" "d" "e"]]

so I have to increase internal indentation level of followed siblings.

Optimal solution would be detecting the span of token after "comma syntax" and turn level followed expressions back to normal indentation level. I'm not able to do that at current based this codebase.

@tiye tiye requested a review from a team March 12, 2021 13:11
@csvwolf csvwolf merged commit f779f79 into master Mar 12, 2021
@csvwolf csvwolf deleted the fix-comma branch March 12, 2021 14:22
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