MagicStack / MagicStack/MagicPython

Atom Hydrogen error "unexpected EOF while parsing" for python `if` statement!?

Open
#179 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
JavaScript
Stars
1.4k
Forks
98
PR merge metrics
No merged PRs in 30d

Description

Seems to be a problem w/ how Atom interprets the code. `For` loops it will give me the option to "fold" or "collapse" by clicking the carrot in the line number. Yet, `if` loops have no such luck.

* **Editor name and version**: Atom 1.35.1
* **Platform**: Mac OS Sierra 10.12.6
* **Color scheme**: One Dark/Solarized Dark
* **MagicPython version**: 0.4.15
* **A sreenshot**:
![image](https://user-images.githubusercontent.com/2372346/55832867-7bf1d380-5ae4-11e9-94b9-83f23e6258de.png)

* **5-10 lines of surrounding code**:

```
## this works:
for i in range(10):
print( i)

## this doesn't:
if not False:
print("test worked")

```

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Reproduce the issue in Atom 1.35.1 with the supplied `for` and `if` snippets on the reported platform. Start by tracing the Python folding or parsing path used for these statements; no source file or test is named in the report. Done means the `if` block folds like the `for` block and no unexpected EOF error is reported.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
tooling
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.