Commit Graph

20 Commits

Author SHA1 Message Date
Xavier Claessens f0dc61a764 interpreter: Add testcase..endtestcase clause support
This is currently only enabled when running unit tests to facilitate
writing failing unit tests.

Fixes: #11394
2023-03-01 20:13:34 -05:00
Eli Schwartz c0b8e02d9f
FeatureNew: add mypy type annotations for subproject arg
Use a derived type when passing `subproject` around, so that mypy knows
it's actually a SubProject, not a str. This means that passing anything
other than a handle to the interpreter state's subproject attribute
becomes a type violation, specifically when the order of the *four*
different str arguments is typoed.
2022-02-14 20:40:41 -05:00
Daniel Mensinger dfec4385a7 interpreter: Move RangeHolder out of interpreterbase to interpreter 2021-10-06 22:37:18 +02:00
Daniel Mensinger af0587cb49 interpreter: Holderify arrays and dicts
This is the final refactoring for extracting the bultin object
logic out of Interpreterbase. I decided to do both arrays and
dicts in one go since splitting it would have been a lot more
confusing.
2021-10-06 22:37:18 +02:00
Daniel Mensinger 6b00c7dc81 Remove helpers.check_stringlist() 2021-09-25 12:44:11 +02:00
Daniel Mensinger d93d01b6c5 interpreter: Introduce StringHolder
Another commit in my quest to rid InterpreterBase from all higher
level object processing logic.

Additionally, there is a a logic change here, since `str.join` now
uses varargs and can now accept more than one argument (and supports
list flattening).
2021-09-25 12:44:11 +02:00
Daniel Mensinger 43a6b5bd5e interpreter: Remove permissive from _unholder 2021-09-01 19:17:01 +02:00
Daniel Mensinger 8d92e6d865 interpreter: Add IntegerHolder 2021-08-31 23:01:21 +02:00
Daniel Mensinger 86f70c873a interpreter: Introduce operators support for InterpreterObjects 2021-08-31 23:01:21 +02:00
Xavier Claessens f8cfd91d71 Simplify get_callee_args 2021-08-30 14:00:54 -04:00
Daniel Mensinger 971a0b1775 fix: get_variable default variables are not ObjectHolders (fixes #8936) 2021-07-02 17:14:44 +03:00
Daniel Mensinger 8f7343831b refactor: Refactor BothLibraries logic
This commit introduces a new type of `HoldableObject`: The
`SecondLevelHolder`. The primary purpose of this class is
to handle cases where two (or more) `HoldableObject`s are
stored at the same time (with one default object). The
best (and currently only) example here is the `BothLibraries`
class.
2021-06-26 12:49:35 +02:00
Daniel Mensinger 34c28dc92c holders: remove unholder 2021-06-18 23:48:33 +02:00
Daniel Mensinger c2c7f7c9d7 holders: Ensure that InterpreterBase is the sole instance for (un)holderifying 2021-06-18 23:48:33 +02:00
Daniel Mensinger 63ade7d937 interpreter: Add a new MesonInterpreterObject for non-elementary objects 2021-06-18 23:48:33 +02:00
Daniel Mensinger e686545fce interpreter: Split decorators from interpreterbase.py 2021-06-11 10:42:18 +02:00
Daniel Mensinger fc0397b309 interpreter: Split Disabler from interpreterbase.py 2021-06-11 10:42:18 +02:00
Daniel Mensinger 687eebee29 interpreter: Split base objects and helpers from interpreterbase.py 2021-06-11 10:42:18 +02:00
Daniel Mensinger 2e3550db14 interpreter: Split exception calsses from interpreterbase.py 2021-06-11 10:42:18 +02:00
Daniel Mensinger ad584f022d interpreter: Move interpreterbase.py into a new package 2021-06-11 10:42:18 +02:00