| OLD | NEW |
| 1 # Copyright 2014 Google Inc. All Rights Reserved. | 1 # Copyright 2017 The Chromium Authors. All Rights Reserved. |
| 2 # | 2 # |
| 3 # Licensed under the Apache License, Version 2.0 (the "License"); | 3 # Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 # you may not use this file except in compliance with the License. | 4 # you may not use this file except in compliance with the License. |
| 5 # You may obtain a copy of the License at | 5 # You may obtain a copy of the License at |
| 6 # | 6 # |
| 7 # http://www.apache.org/licenses/LICENSE-2.0 | 7 # http://www.apache.org/licenses/LICENSE-2.0 |
| 8 # | 8 # |
| 9 # Unless required by applicable law or agreed to in writing, software | 9 # Unless required by applicable law or agreed to in writing, software |
| 10 # distributed under the License is distributed on an "AS IS" BASIS, | 10 # distributed under the License is distributed on an "AS IS" BASIS, |
| 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| (...skipping 74 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 86 # Utility function for performing variable expansions. | 86 # Utility function for performing variable expansions. |
| 87 vars_dict = {} | 87 vars_dict = {} |
| 88 def _Var(s): | 88 def _Var(s): |
| 89 return vars_dict[s] | 89 return vars_dict[s] |
| 90 | 90 |
| 91 tree = ast.parse(contents, path) | 91 tree = ast.parse(contents, path) |
| 92 vars_dict = _FindGlobalVariableInAstTree(tree, 'vars') | 92 vars_dict = _FindGlobalVariableInAstTree(tree, 'vars') |
| 93 deps_dict = _FindGlobalVariableInAstTree( | 93 deps_dict = _FindGlobalVariableInAstTree( |
| 94 tree, 'deps', functions={'Var': _Var}) | 94 tree, 'deps', functions={'Var': _Var}) |
| 95 return deps_dict | 95 return deps_dict |
| OLD | NEW |