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

fix: dedent error when EOF comes in a block of two or greater depth #316

Merged
merged 2 commits into from
Dec 28, 2022

Conversation

GreasySlug
Copy link
Member

@GreasySlug GreasySlug commented Dec 28, 2022

Fixes #315.

Dedent is automatically called if EOF is at the end of the block
In this case, it is interpreted that no spaces are inserted, resulting in a problem where indentation and spaces do not match
This caused an invalid indent error

Changes proposed in this PR:

  • A ssigned whitespces length to var
  • Add zero whitespace case

@mtshiba

@GreasySlug GreasySlug changed the title fix: dedent error when EOF comes In a block of depth 2 or greater fix: dedent error when EOF comes in a block of two or greater depth Dec 28, 2022
@GreasySlug GreasySlug merged commit 29a1b8a into erg-lang:main Dec 28, 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.

Error in Dedent when block ends in EOF
1 participant