| OLD | NEW |
| 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 // Copyright (c) 2013 The Chromium Authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "tools/gn/functions.h" | 5 #include "tools/gn/functions.h" |
| 6 | 6 |
| 7 #include <iostream> | 7 #include <iostream> |
| 8 | 8 |
| 9 #include "base/environment.h" | 9 #include "base/environment.h" |
| 10 #include "base/strings/string_util.h" | 10 #include "base/strings/string_util.h" |
| (...skipping 756 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 767 return Value(); | 767 return Value(); |
| 768 } | 768 } |
| 769 | 769 |
| 770 Scope block_scope(scope); | 770 Scope block_scope(scope); |
| 771 block->ExecuteBlockInScope(&block_scope, err); | 771 block->ExecuteBlockInScope(&block_scope, err); |
| 772 if (err->has_error()) | 772 if (err->has_error()) |
| 773 return Value(); | 773 return Value(); |
| 774 | 774 |
| 775 Value result = found_function->second.executed_block_runner( | 775 Value result = found_function->second.executed_block_runner( |
| 776 function, args.list_value(), &block_scope, err); | 776 function, args.list_value(), &block_scope, err); |
| 777 if (err->has_error()) |
| 778 return Value(); |
| 777 | 779 |
| 778 if (!block_scope.CheckForUnusedVars(err)) | 780 if (!block_scope.CheckForUnusedVars(err)) |
| 779 return Value(); | 781 return Value(); |
| 780 return result; | 782 return result; |
| 781 } | 783 } |
| 782 | 784 |
| 783 // Otherwise it's a no-block function. | 785 // Otherwise it's a no-block function. |
| 784 return found_function->second.no_block_runner(scope, function, | 786 return found_function->second.no_block_runner(scope, function, |
| 785 args.list_value(), err); | 787 args.list_value(), err); |
| 786 } | 788 } |
| 787 | 789 |
| 788 } // namespace functions | 790 } // namespace functions |
| OLD | NEW |