|
This is in preparation for using {{patterns}} in toolchain definitions. It makes them
more generic and usable for this, without actually implementing any new features or
changing behavior. The only external change should be that the $in variable is used for
actions instead of making a redundant new variable (used to be called $source).
It removes the FileTemplate class and explodes it into several files: the type list and
helpers (substitution_type), a single pattern (substitution_pattern), a list of patterns
(substitution_list), and a class of helper functions for processing templates in various
ways (substitution_writer).
Previously, the things needing substitutions (args, outputs, depfile) were stored as
strings and parsed in to FileTemplates as needed. This new method stores the
SubstitutionList/Pattern directly on the target. This allows it to issue parse errors
(previously such errors were ignored since errors weren't reportable when writing Ninja
files) and cleans up a lot of the code that uses it.
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/429423002
git-svn-id: svn://svn.chromium.org/chrome/trunk/src@287847 0039d316-1c4b-4281-b951-d872f2087c98
|