aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild/ast
AgeCommit message (Collapse)AuthorFilesLines
2019-09-04mintro: Fix resolving nodes in kwargs (fixes #5884)Daniel Mensinger1-42/+66
2019-08-12Add is_disabler functionJames Hilliard1-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>
2019-07-31mintro: Fix crash related to the sources kwarg (fixes #5741)Daniel Mensinger2-3/+7
2019-07-11Merge pull request #5606 from xclaesse/alias_targetJussi Pakkanen1-0/+1
Add alias_target() function
2019-07-10Add alias_target() functionXavier Claessens1-0/+1
2019-06-28ast: printer fix index node printingDaniel Mensinger2-1/+3
2019-06-09Purge `is_cross` and friends without changing user interfacesJohn Ericson1-7/+8
In most cases instead pass `for_machine`, the name of the relevant machines (what compilers target, what targets run on, etc). This allows us to use the cross code path in the native case, deduplicating the code. As one can see, environment got bigger as more information is kept structured there, while ninjabackend got a smaller. Overall a few amount of lines were added, but the hope is what's added is a lot simpler than what's removed.
2019-05-13ast: fix #5376Daniel Mensinger2-3/+9
2019-04-29Fix flake8-bugbear warningsDaniel Mensinger1-2/+0
2019-04-29Fix builtin variable namesDaniel Mensinger1-3/+3
2019-04-29Fix blind exceptionsDaniel Mensinger1-1/+1
2019-04-25ast/printer: remove useless ternaryDylan Baker1-1/+1
The ternary returns True or False from an expression that returns True or False: i.e. True if bool(value) else False.
2019-04-23ast: Address code reviewDaniel Mensinger1-3/+7
2019-04-23make flake8 happyDaniel Mensinger1-1/+0
2019-04-23ast: Make sure to avoid infinite recursionsDaniel Mensinger1-9/+9
2019-04-23ast: support elementary object methodsDaniel Mensinger1-6/+40
2019-04-23ast: resolve simple arithmetic nodesDaniel Mensinger1-4/+29
2019-04-23ast: resolve ID nodes in flatten_argsDaniel Mensinger2-23/+27
2019-04-23Don't use mutable types as default argumentsDylan Baker2-4/+5
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.
2019-04-13mintro: Fix set_variable plus assign bug (closes #5256)Daniel Mensinger1-0/+1
2019-04-02mintro: fix some interpreter crashesDaniel Mensinger2-1/+27
2019-04-02mintro: Fix crash when required is a function (closes #5177)Daniel Mensinger1-0/+2
2019-03-04rewriter: Handle duplicate targetDaniel Mensinger2-5/+7
2019-03-03intro: Fixed code after rebaseDaniel Mensinger1-1/+1
2019-03-03mintro: Dependencies from sourceDaniel Mensinger3-1/+40
2019-03-03Target introspection from sourceDaniel Mensinger1-2/+4
2019-03-03rewriter: Minor code cleanupDaniel Mensinger1-12/+13
2019-03-03rewriter: Handle Arithmetic nodeDaniel Mensinger1-2/+4
2019-03-01mintro: Add subproject_dir to --projectinfoDaniel Schulte1-2/+2
2019-02-26mconf: Fixed crash for variables in targets (closes #4960)Daniel Mensinger1-1/+2
2019-02-16Can now find the assignment node of a valueDaniel Mensinger2-6/+21
2019-02-16Merge pull request #4858 from mensinda/rwKWARGSJussi Pakkanen2-6/+20
rewriter: Add support for kwargs modification
2019-02-11allow setting directory locations in a native fileDylan Baker1-1/+1
This allows the person running configure (either a developer, user, or distro maintainer) to keep a configuration of where various kinds of files should end up.
2019-02-01Ensure that func dicts provide the same set of functionsDaniel Mensinger1-0/+10
2019-01-31Added dependecy kwargs supportDaniel Mensinger1-0/+12
2019-01-31Added test caseDaniel Mensinger1-4/+2
2019-01-31Some fixes and assignment based target findDaniel Mensinger2-2/+6
2019-01-24Fixed style issuesDaniel Mensinger1-14/+14
2019-01-22Fixed flake8 issuesDaniel Mensinger2-5/+4
2019-01-22Can now rewrite filesDaniel Mensinger1-2/+14
2019-01-22First rewriter test caseDaniel Mensinger3-9/+37
2019-01-22Added support for assignments in the AST interpretorDaniel Mensinger1-2/+9
2019-01-22Added target AST Interpreter supportDaniel Mensinger2-8/+115
2019-01-22Removed the RewriteIntrepreterDaniel Mensinger2-146/+1
2019-01-22AST post processingDaniel Mensinger4-72/+164
2019-01-22Moved the introspection interpreterDaniel Mensinger3-5/+129
2019-01-22Added Ast printerDaniel Mensinger2-3/+193
2019-01-22Basic AST visitor patternDaniel Mensinger4-0/+497