Open d-u-d-e opened 1 week ago
I don't think having a folder for each type of test is useful, in most cases there will only be one file (test_xxx.py), so I believe it's better to keep them all under test/
. For those special cases that require multiple classes, one can have multiple unittest.TestCase
class inside one file.
We will write tests for the pretty printer with https://github.com/d-u-d-e/c-compiler/issues/26, and we will create another PR because we are introducing too many changes already with this one.
Description 📌
With this PR we implement a basic version of the parser (pages 10-17 of the book).
Implementation Details 📝
Testing 🔎
Additional information ✨
Examples of running the driver as a standalone module:
In this case the source code contains:
If we run the driver with an invalid source file like:
we get: