Skip to content

Commit

Permalink
Fix parsing scoped filename variables.
Browse files Browse the repository at this point in the history
  • Loading branch information
dillof committed Apr 13, 2024
1 parent 9c340ec commit 00942c7
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 1 deletion.
1 change: 0 additions & 1 deletion src/FilenameVariable.cc
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ FilenameVariable::FilenameVariable(std::string name, Tokenizer& tokenizer) : Var
token = tokenizer.next();
if (token.type == Tokenizer::TokenType::BEGIN_SCOPE) {
value = FilenameList(tokenizer, FilenameList::SCOPED);
tokenizer.expect(Tokenizer::TokenType::END_SCOPE);
}
else {
tokenizer.unget(token);
Expand Down
40 changes: 40 additions & 0 deletions tests/filelist.test
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
arguments ..
file input <>
input
end-of-inline-data
file input-2 <>
input 2
end-of-inline-data
file build.fninja <>
version = 2
sources :=
input
input-$version
output

rule a
command = a $in $out
flags = --verbose

build output: a input
build final: a $sources
end-of-inline-data
file build/build.ninja {} <>
# This file is automatically created by fast-ninja from ../build.fninja
# Do not edit.
version = 2

rule a
command = a $in $out
flags = --verbose

rule fast-ninja
command = fast-ninja ..
generator = 1

build output : a ../input

build final : a ../input ../input-2 output

build build.ninja : fast-ninja ../build.fninja
end-of-inline-data

0 comments on commit 00942c7

Please sign in to comment.