diff options
author | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-13 15:05:36 +0100 |
---|---|---|
committer | Allan Sandfeld Jensen <allan.jensen@qt.io> | 2019-02-14 10:33:47 +0000 |
commit | e684a3455bcc29a6e3e66a004e352dea4e1141e7 (patch) | |
tree | d55b4003bde34d7d05f558f02cfd82b2a66a7aac /chromium/build/gn_helpers.py | |
parent | 2b94bfe47ccb6c08047959d1c26e392919550e86 (diff) | |
download | qtwebengine-chromium-e684a3455bcc29a6e3e66a004e352dea4e1141e7.tar.gz |
BASELINE: Update Chromium to 72.0.3626.110 and Ninja to 1.9.0
Change-Id: Ic57220b00ecc929a893c91f5cc552f5d3e99e922
Reviewed-by: Michael BrĂ¼ning <michael.bruning@qt.io>
Diffstat (limited to 'chromium/build/gn_helpers.py')
-rw-r--r-- | chromium/build/gn_helpers.py | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/chromium/build/gn_helpers.py b/chromium/build/gn_helpers.py index a9d1e2ee91a..25f1240c73a 100644 --- a/chromium/build/gn_helpers.py +++ b/chromium/build/gn_helpers.py @@ -171,6 +171,19 @@ class GNValueParser(object): while not self.IsDone() and self.input[self.cur] in ' \t\n': self.cur += 1 + def ConsumeComment(self): + if self.IsDone() or self.input[self.cur] != '#': + return + + # Consume each comment, line by line. + while not self.IsDone() and self.input[self.cur] == '#': + # Consume the rest of the comment, up until the end of the line. + while not self.IsDone() and self.input[self.cur] != '\n': + self.cur += 1 + # Move the cursor to the next line (if there is one). + if not self.IsDone(): + self.cur += 1 + def Parse(self): """Converts a string representing a printed GN value to the Python type. @@ -203,6 +216,7 @@ class GNValueParser(object): d = {} self.ConsumeWhitespace() + self.ConsumeComment() while not self.IsDone(): ident = self._ParseIdent() self.ConsumeWhitespace() @@ -212,6 +226,7 @@ class GNValueParser(object): self.ConsumeWhitespace() val = self._ParseAllowTrailing() self.ConsumeWhitespace() + self.ConsumeComment() d[ident] = val return d |