class_docstr: Parser for ASDL files.
  
  Create, then call the parse method on a buffer containing ASDL.
  This is a simple recursive descent parser that uses tokenize_asdl for the
  lexing.
class_docstr_tok: ["Parser","for","ASDL","files",".","Create",",","then","call","the","parse","method","on","a","buffer","containing","ASDL",".","This","is","a","simple","recursive","descent","parser","that","uses","tokenize_asdl","for","the","lexing","."]
code: def _parse_fields(self):
      fields = []
      self._match(TokenKind.LParen)
      while self.cur_token.kind == TokenKind.TypeId:
          typename = self._advance()
          is_seq, is_opt = self._parse_optional_field_quantifier()
          id = (
              self._advance()
              if self.cur_token.kind in self._id_kinds
              else None
          )
          fields.append(Field(typename, id, seq=is_seq, opt=is_opt))
          if self.cur_token.kind == TokenKind.RParen:
              break
          elif self.cur_token.kind == TokenKind.Comma:
              self._advance()
      self._match(TokenKind.RParen)
      return fields
  
imports: from collections import namedtuple
  import re
label_desc: Use image node_id 7 for calling the ASDLParser obj's underlying member method code with example usage: obj._parse_fields() and returns: fields