Skip to content

Commit 42e2b11

Browse files
committed
Add support for scanning parentheses in stage description and tests.
1 parent 95cfa59 commit 42e2b11

File tree

1 file changed

+27
-6
lines changed

1 file changed

+27
-6
lines changed

course-definition.yml

Lines changed: 27 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -223,18 +223,39 @@ stages:
223223

224224
# The instructions for your stage. Markdown supported. Shown on the course page.
225225
description_md: |-
226-
In this stage, we'll do XYZ
226+
In this stage, you'll add support for scanning parentheses (`(` and `)`).
227227
228-
**Example:** ABC
228+
### Book references
229229
230-
Your program will be executed like this:
230+
- This stage is part of the [Scanning](https://craftinginterpreters.com/scanning.html) chapter.
231+
- The code for this stage is implemented in [Section 4.2: Recognizing Lexemes](https://craftinginterpreters.com/scanning.html#recognizing-lexemes).
232+
233+
### Tests
234+
235+
The tester will run a series of tests with `test.lox` files that contain parentheses.
236+
237+
For example, if `test.lox` contains the following:
238+
239+
```bash
240+
(()
241+
```
242+
243+
The tester will run your program like this:
231244
232245
```bash
233-
$ echo "apple" | ./your_executable.sh -E "a"
246+
$ ./your_program.sh tokenize test.lox
247+
LEFT_PAREN ( null
248+
LEFT_PAREN ( null
249+
RIGHT_PAREN ) null
250+
EOF null
234251
```
235252
236-
You program must ABCD.
253+
The tester will assert that the stdout output matches the format above.
254+
255+
### Notes
256+
257+
- This output format matches the spec in the [book's repository](https://github.com/munificent/craftinginterpreters/tree/01e6f5b8f3e5dfa65674c2f9cf4700d73ab41cf8/test/scanning)
237258
238259
# A description of this stage that is used on the course overview page and other marketing material. Markdown supported.
239260
marketing_md: |-
240-
In this stage, we'll do XYZ.
261+
In this stage, you'll implement support for scanning parentheses.

0 commit comments

Comments
 (0)