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

Fixed an issue where multiple chunks can be declared on a single line #291

Merged
merged 2 commits into from
Dec 30, 2022

Conversation

GreasySlug
Copy link
Member

@GreasySlug GreasySlug commented Dec 12, 2022

Fixes #281

It is possible to declare multiple chunks on a single line with whitespace

It is an invalid syntax and should be detected as an error in the parser

  • declaration
  • Array
  • Set
  • Dict
  • Record
  • Tuple
  • Class
    @mtshiba

@GreasySlug

This comment was marked as outdated.

@GreasySlug

This comment was marked as outdated.

@GreasySlug GreasySlug force-pushed the fix/#281 branch 2 times, most recently from aca2cf7 to dd36a16 Compare December 15, 2022 11:53
@GreasySlug GreasySlug changed the title [WIP]Fixed an issue where multiple chunks can be declared on a single line Fixed an issue where multiple chunks can be declared on a single line Dec 15, 2022
@GreasySlug

This comment was marked as outdated.

@GreasySlug GreasySlug marked this pull request as ready for review December 15, 2022 12:52
@GreasySlug

This comment was marked as outdated.

compiler/erg_parser/parse.rs Outdated Show resolved Hide resolved
compiler/erg_parser/parse.rs Outdated Show resolved Hide resolved
@GreasySlug
Copy link
Member Author

i = 2 j = 1 and { "a": 1 "b": 1 } are different kinds of problems in Erg parsing.

The comma error in the collection is a different issue than this PR and has been removed from this.
So, I squashed commits.

@GreasySlug GreasySlug merged commit 73e4561 into erg-lang:main Dec 30, 2022
@GreasySlug GreasySlug deleted the fix/#281 branch December 31, 2022 05:12
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.

Multiple declarations on a single line
2 participants