# Class: Parser

## ProtoBuf.DotProto. Parser

prototype parser

#### new Parser(proto)

  Constructs a new Parser.

  ##### Parameters:

  Name | Type | Description
  --- | --- | ---
  `proto` | string | Protocol source

  Source:
    - ProtoBuf.js, line 611

### Members

#### tn :ProtoBuf.DotProto.Tokenizer

  Tokenizer.

  ##### Type:

  - ProtoBuf.DotProto.Tokenizer
  Source:
    - ProtoBuf.js, line 618

### Methods

#### parse() → {Object}

  Runs the parser.

  Source:
    - ProtoBuf.js, line 633

  ##### Throws:

  If the source cannot be parsed
  Type
    Error

  ##### Returns:

  Type
    Object

#### toString() → {string}

  Returns a string representation of this object.

  Source:
    - ProtoBuf.js, line 1308

  ##### Returns:

  String representation as of "Parser"

  Type
    string