Граф коммитов

3 Коммитов

Автор SHA1 Сообщение Дата
dpranke 37a665d265 Add FromGNArgs() to gn_helpers.
This adds a method to convert a string containing a list of
gn --args -like assignments to a python dict.

(ToGNString() already supports the opposite direction).

R=brettw@chromium.org, hashimoto@chromium.org
BUG=561142

Review URL: https://codereview.chromium.org/1847333005

Cr-Original-Commit-Position: refs/heads/master@{#385336}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 65d84dc0f629632d10687e2c85e8eea55362dc5d
2016-04-06 00:10:38 +00:00
dpranke 26a4df329b Fix gn_helpers' parsing of bools.
R=brettw@chromium.org
BUG=561142

Review URL: https://codereview.chromium.org/1844823002

Cr-Original-Commit-Position: refs/heads/master@{#384752}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: e031ec2442e681ee5f4e1ffba4629fc3fd28a997
2016-04-02 00:18:53 +00:00
brettw 6eae15d0ce Add a Python parser for GN types to gn_helpers.
Some scripts take serialized GN values including strings and lists. These are serialized and escaped according to GN rules. In particular, the string escaping is not possible to duplicate with Python's "ast" module. This simple parser will convert values properly.

Add unit tests for new code, as well as existing code in gn_helpers.

Fix omissions in existing ToGNString code.

BUG=573132,571022

Review URL: https://codereview.chromium.org/1553993002

Cr-Original-Commit-Position: refs/heads/master@{#371000}
Cr-Mirrored-From: https://chromium.googlesource.com/chromium/src
Cr-Mirrored-Commit: 9dffb54bc426d84e4a2a1a6fb2989bf53237f5a2
2016-01-22 18:42:46 +00:00