summaryrefslogtreecommitdiffstats
path: root/tools/gn/substitution_pattern_unittest.cc
Commit message (Collapse)AuthorAgeFilesLines
* gn: Fix some typos in unittests.Thiago Farina2014-09-201-1/+1
| | | | | | | | | | | | | | SubstitutionPatterm -> SubstitutionPattern SubstutitionWriter -> SubstitutionWriter BUG=None TEST=ninja -C out/Debug gn_unittests - compare the output before and after this change. TBR=brettw@chromium.org Review URL: https://codereview.chromium.org/590683002 Cr-Commit-Position: refs/heads/master@{#295846}
* Refactor GN source expansions.brettw@chromium.org2014-08-061-0/+49
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