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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
636 | 636 |
637 FunctionInfoInitializer() { | 637 FunctionInfoInitializer() { |
638 #define INSERT_FUNCTION(command, is_target) \ | 638 #define INSERT_FUNCTION(command, is_target) \ |
639 map[k##command] = FunctionInfo(&Run##command, \ | 639 map[k##command] = FunctionInfo(&Run##command, \ |
640 k##command##_HelpShort, \ | 640 k##command##_HelpShort, \ |
641 k##command##_Help, \ | 641 k##command##_Help, \ |
642 is_target); | 642 is_target); |
643 | 643 |
644 INSERT_FUNCTION(Action, true) | 644 INSERT_FUNCTION(Action, true) |
645 INSERT_FUNCTION(ActionForEach, true) | 645 INSERT_FUNCTION(ActionForEach, true) |
646 INSERT_FUNCTION(Component, true) | |
647 INSERT_FUNCTION(Copy, true) | 646 INSERT_FUNCTION(Copy, true) |
648 INSERT_FUNCTION(Executable, true) | 647 INSERT_FUNCTION(Executable, true) |
649 INSERT_FUNCTION(Group, true) | 648 INSERT_FUNCTION(Group, true) |
650 INSERT_FUNCTION(SharedLibrary, true) | 649 INSERT_FUNCTION(SharedLibrary, true) |
651 INSERT_FUNCTION(SourceSet, true) | 650 INSERT_FUNCTION(SourceSet, true) |
652 INSERT_FUNCTION(StaticLibrary, true) | 651 INSERT_FUNCTION(StaticLibrary, true) |
653 INSERT_FUNCTION(Test, true) | |
654 | 652 |
655 INSERT_FUNCTION(Assert, false) | 653 INSERT_FUNCTION(Assert, false) |
656 INSERT_FUNCTION(Config, false) | 654 INSERT_FUNCTION(Config, false) |
657 INSERT_FUNCTION(DeclareArgs, false) | 655 INSERT_FUNCTION(DeclareArgs, false) |
658 INSERT_FUNCTION(Defined, false) | 656 INSERT_FUNCTION(Defined, false) |
659 INSERT_FUNCTION(ExecScript, false) | 657 INSERT_FUNCTION(ExecScript, false) |
660 INSERT_FUNCTION(ForEach, false) | 658 INSERT_FUNCTION(ForEach, false) |
661 INSERT_FUNCTION(GetEnv, false) | 659 INSERT_FUNCTION(GetEnv, false) |
662 INSERT_FUNCTION(GetLabelInfo, false) | 660 INSERT_FUNCTION(GetLabelInfo, false) |
663 INSERT_FUNCTION(GetPathInfo, false) | 661 INSERT_FUNCTION(GetPathInfo, false) |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
747 return Value(); | 745 return Value(); |
748 return result; | 746 return result; |
749 } | 747 } |
750 | 748 |
751 // Otherwise it's a no-block function. | 749 // Otherwise it's a no-block function. |
752 return found_function->second.no_block_runner(scope, function, | 750 return found_function->second.no_block_runner(scope, function, |
753 args.list_value(), err); | 751 args.list_value(), err); |
754 } | 752 } |
755 | 753 |
756 } // namespace functions | 754 } // namespace functions |
OLD | NEW |