Commit graph

21 commits

Author SHA1 Message Date
Sei Lisa
5841c2c17a Introduce 'c' (constant) as symbol kind
This is preparatory work for addressing issue #30. It also fixes a bug where --prettify made the constants writable.
2024-05-28 17:31:22 +02:00
Sei Lisa
f854e94349 New copyright year 2024-04-14 11:40:21 +02:00
Sei Lisa
231c16b90e New copyright year 2023-02-03 13:06:18 +01:00
Sei Lisa
79a57e6532 Fix some discrepancies between main and run-tests
These discrepancies were in how line endings are interpreted, and were causing issues under Windows.

Also simplify CRLF handling.
2022-12-11 18:54:48 +01:00
Sei Lisa
8d413f910e Forgot to update copyright year 2022-06-07 19:46:31 +02:00
Sei Lisa
81906475ff Update copyright year 2021-01-05 23:27:21 +01:00
Sei Lisa
0b266db758 Fix InternalUTF8ToString to consider U+FFFE as invalid
This commit also adds the foldtabs option as default for the eval test suite, and substantially improves the Unicode valid/invalid character test.
2020-11-19 22:26:42 +01:00
Sei Lisa
e1bcccb979 All tests pass now 2020-11-10 02:14:15 +01:00
Sei Lisa
16d8c4c9d1 More progress in migration to dual Python 2&3. Just 2 tests left. 2020-11-10 00:15:48 +01:00
Sei Lisa
f8cf78dfac Progress towards dual Python 2 & 3 2020-11-09 02:28:57 +01:00
Sei Lisa
d9938f1a37 Misc small non-user-visible fixes
Some are Unicode vs Str stuff, others are style adjustments, others in unused functions, and so on.
2020-11-09 02:00:40 +01:00
Pedro Gimeno
f1d5905d7e Process arguments as str instead of bytes 2020-11-08 17:26:59 +01:00
Sei Lisa
234b9b23a3 Bump copyright year 2020-04-23 00:38:20 +02:00
Sei Lisa
9d540798b4 Allow returning void expressions where state changes are allowed
In the same places as state changes are allowed, i.e. in places where a parent of the AST node is a WHILE/DO/FOR or an IF without ELSE, it's allowed to use return statements with expressions that return void, e.g. llDie(), provided the function itself is declared as returning void.

The construction, when found, is rewritten to '{<void expression>; return;}' because the optimizer is not designed to deal with these monsters.

We've renamed the variable SuspiciousStSw to PruneBug, because it's used for both purposes now, though a better name might have been PruneBugPendingChecks, because these are only errors if the IF has an ELSE. We've also added the exception to raise as part of the data stored in the list.

Per report by Tonaie Resident.
2019-05-01 04:28:58 +02:00
Sei Lisa
f0068dd3bc Style fixes
Calm pyflakes by using identifiers, and change hexversion to version.major.
2019-02-04 00:07:12 +01:00
Sei Lisa
fe2dd9a721 First baby steps towards dual Python2+3 compatibility 2019-01-16 00:15:06 +01:00
Sei Lisa
cf5ee2793a Make mismatches fail with assertTrue instead of assertEqual
We already report the differences even in diff format, and the scripts can get long. The output of assertEqual was not useful, therefore it's eliminated.
2019-01-05 22:50:12 +01:00
Sei Lisa
1a83213a40 Explain the states in the argument parser 2019-01-05 00:50:08 +01:00
Sei Lisa
40cd88e9f7 Minor pickiness
Even if the last char is a backslash, if we're inside a double quoted string, report unterminated string on EOF.
2019-01-05 00:09:50 +01:00
Sei Lisa
054539adf9 Make .fail files replace the docstring in order to be visible 2019-01-04 22:29:15 +01:00
Sei Lisa
1867dc78e7 Add the new test suite.
This test suite has been in use for a long time now, in place of the obsolete and unmanageable testparser.py and testfuncs.py. It verifies the complete optimizer output to stdout and stderr, to ensure that the output matches the expectations.

See unit_tests/README.txt for more info.
2019-01-04 20:27:36 +01:00