Parsing Programs: Declarations and Statements Checkpoint

Predict fresh artifacts, diagnose a broken invariant, and test a version boundary. Select one answer per multiple-choice question; numeric responses use the stated integer format. Use review links to revisit the relevant representation, then attempt the independent transfer task.


Get every question correct to pass this checkpoint. You can review feedback, revise your answers, and submit again.

1. Which lookahead selects assignment in v2 statement parsing?

Select one answer.

2. How many top-level statements/declarations are in let a=1; { a=2; a; } a; ? Enter only the requested integer.
3. How should a syntactically valid top-level return 4; be handled?

Select one answer.

4. What happens when fn inner(){} appears inside a v2 function body?

Select one answer.

5. A parser reaches EOF inside an open block. What should it do?

Select one answer.

Join Discord