tools/traffic_annotation/scripts/extractor.py
def _parse_string(self, tokenizer: Tokenizer) -> str:
    """Parse a string value.

    It could be a string literal by itself, or multiple string literals
    concatenated together. Add a newline to the string for each
    concatenation."""
    text = tokenizer.advance('string_literal')
    while True:
      # Perform concatenations.
      if tokenizer.maybe_advance('plus') is None:
        break
      text += '\n'
      text += tokenizer.advance('string_literal')
    return text
Parse a string value.

    It could be a string literal by itself, or multiple string literals
    concatenated together. Add a newline to the string for each
    concatenation.
Parse a string value.
It could be a string literal by itself, or multiple string literals
concatenated together. Add a newline to the string for each
concatenation.
Parse a string value . It could be a string literal by itself or multiple string literals concatenated together . Add a newline to the string for each concatenation .
def _parse_string(self, tokenizer: Tokenizer) -> str:
    text = tokenizer.advance('string_literal')
    while True:
      if tokenizer.maybe_advance('plus') is None:
        break
      text += '\n'
      text += tokenizer.advance('string_literal')
    return text
def _parse_string ( self , tokenizer : Tokenizer ) -> str : text = tokenizer . advance ( 'string_literal' ) while True : if tokenizer . maybe_advance ( 'plus' ) is None : break text += '\n' text += tokenizer . advance ( 'string_literal' ) return text
Parse a string value.
Parse a string value .
"""Parse a string value.

    It could be a string literal by itself, or multiple string literals
    concatenated together. Add a newline to the string for each
    concatenation.""" # Perform concatenations.
self
tokenizer
Tokenizer