diff options
author | Nicolas Despres <nicolas.despres@gmail.com> | 2015-09-21 10:01:33 (GMT) |
---|---|---|
committer | Nicolas Despres <nicolas.despres@gmail.com> | 2019-05-09 14:36:47 (GMT) |
commit | bb9512f53daa5913220282f0ad86a20d174e367c (patch) | |
tree | f4fdf019cad3ee6dc5fce2338f144431797607a2 /src/eval_env.h | |
parent | 2e64645749ff91eff2f999f03f55da360ae5913d (diff) | |
download | Ninja-bb9512f53daa5913220282f0ad86a20d174e367c.zip Ninja-bb9512f53daa5913220282f0ad86a20d174e367c.tar.gz Ninja-bb9512f53daa5913220282f0ad86a20d174e367c.tar.bz2 |
Resurrect the 'rules' tool.
This tool is useful for writing shell completion script for tools
expecting a rule name as argument.
The tool was dropped by 34b46f28c.
Fix #1024.
Diffstat (limited to 'src/eval_env.h')
-rw-r--r-- | src/eval_env.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/eval_env.h b/src/eval_env.h index 999ce42..8fb9bf4 100644 --- a/src/eval_env.h +++ b/src/eval_env.h @@ -33,8 +33,13 @@ struct Env { /// A tokenized string that contains variable references. /// Can be evaluated relative to an Env. struct EvalString { + /// @return The evaluated string with variable expanded using value found in + /// environment @a env. string Evaluate(Env* env) const; + /// @return The string with variables not expanded. + string Unparse() const; + void Clear() { parsed_.clear(); } bool empty() const { return parsed_.empty(); } |