summaryrefslogtreecommitdiff
path: root/mesonbuild/ast/interpreter.py
Commit message (Collapse)AuthorAgeFilesLines
* mintro: Fix resolving nodes in kwargs (fixes #5884)Daniel Mensinger2019-09-041-42/+66
|
* Add is_disabler functionJames Hilliard2019-08-121-0/+1
| | | | | | This is useful if one needs to check if a variable is a disabler. Signed-off-by: James Hilliard <james.hilliard1@gmail.com>
* mintro: Fix crash related to the sources kwarg (fixes #5741)Daniel Mensinger2019-07-311-1/+1
|
* Add alias_target() functionXavier Claessens2019-07-101-0/+1
|
* ast: fix #5376Daniel Mensinger2019-05-131-2/+8
|
* ast: Address code reviewDaniel Mensinger2019-04-231-3/+7
|
* make flake8 happyDaniel Mensinger2019-04-231-1/+0
|
* ast: Make sure to avoid infinite recursionsDaniel Mensinger2019-04-231-9/+9
|
* ast: support elementary object methodsDaniel Mensinger2019-04-231-6/+40
|
* ast: resolve simple arithmetic nodesDaniel Mensinger2019-04-231-4/+29
|
* ast: resolve ID nodes in flatten_argsDaniel Mensinger2019-04-231-20/+23
|
* Don't use mutable types as default argumentsDylan Baker2019-04-231-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | This isn't safe given the way python implements default arguments. Basically python store a reference to the instance it was passed, and then if that argument is not provided it uses the default. That means that two calls to the same function get the same instance, if one of them mutates that instance every subsequent call that gets the default will receive the mutated instance. The idiom to this in python is to use None and replace the None, def in(value: str, container: Optional[List[str]]) -> boolean: return src in (container or []) if there is no chance of mutation it's less code to use or and take advantage of None being falsy. If you may want to mutate the value passed in you need a ternary (this example is stupid): def add(value: str, container: Optional[List[str]]) -> None: container = container if container is not None else [] container.append(value) I've used or everywhere I'm sure that the value will not be mutated by the function and erred toward caution by using ternaries for the rest.
* mintro: Fix set_variable plus assign bug (closes #5256)Daniel Mensinger2019-04-131-0/+1
|
* mintro: fix some interpreter crashesDaniel Mensinger2019-04-021-0/+24
|
* rewriter: Handle duplicate targetDaniel Mensinger2019-03-041-2/+3
|
* Can now find the assignment node of a valueDaniel Mensinger2019-02-161-1/+16
|
* Merge pull request #4858 from mensinda/rwKWARGSJussi Pakkanen2019-02-161-2/+2
|\ | | | | rewriter: Add support for kwargs modification
| * Some fixes and assignment based target findDaniel Mensinger2019-01-311-2/+2
| |
* | Ensure that func dicts provide the same set of functionsDaniel Mensinger2019-02-011-0/+10
|/
* Fixed flake8 issuesDaniel Mensinger2019-01-221-2/+2
|
* First rewriter test caseDaniel Mensinger2019-01-221-1/+1
|
* Added support for assignments in the AST interpretorDaniel Mensinger2019-01-221-2/+9
|
* Added target AST Interpreter supportDaniel Mensinger2019-01-221-6/+23
|
* Removed the RewriteIntrepreterDaniel Mensinger2019-01-221-144/+0
|
* Moved the introspection interpreterDaniel Mensinger2019-01-221-4/+1
|
* Basic AST visitor patternDaniel Mensinger2019-01-221-0/+332