popcodeorg / popcodeorg/popcode
Handle multi-line statements in the console
Nobody has claimed this yet.
- Dominant language
- JavaScript
- Stars
- 191
- Forks
- 143
- Avg merge
- 4d 11h
- Merged PRs (30d)
- 5
Description
If a student types the following into the console and presses Enter:
if (name === "Pop") {
The console should recognize that it is an incomplete statement, and allow the student to keep typing (with an expanded input area to accommodate the new line).
This seems hard—how do we distinguish between an incomplete multiline statement and a statement that is syntactically invalid for some other reason? Perhaps Esprima or one of our other linters/parsers throws a specific “unexpected end of input” type error that we can rely on.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by tracing the console input handling and how its parser or linter reports an unexpected end of input for the example statement. Determine how incomplete input can be distinguished from other syntax errors and how the input area expands for continued lines. Done means the example can continue across lines while genuinely invalid statements still report errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- frontend, web-dev
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100