Home

Class goog.proto2.TextFormatSerializer.Parser

Helper class for parsing the text format.

Instance Method Summary
consumeFieldValue_(?goog.proto2.Message message, ?goog.proto2.FieldDescriptor field) ⇒ boolean

Attempts to consume the value of the given field.

consumeField_(?goog.proto2.Message message) ⇒ boolean

Attempts to consume a field under a message.

consumeIdentifier_() ⇒ ?string

Consumes an IDENTIFIER token.

consumeMessage_(?goog.proto2.Message message, string delimiter) ⇒ boolean

Attempts to consume the given message.

consumeNestedMessage_(?goog.proto2.Message message, ?goog.proto2.FieldDescriptor field) ⇒ boolean

Attempts to consume a nested message.

consumeNumber_() ⇒ ?string

Consumes a NUMBER token.

consumeString_() ⇒ ?string

Consumes a STRING token.

consumeToken_(?goog.proto2.TextFormatSerializer.Tokenizer_.TokenTypes type) ⇒ ?string

Consumes a token of the given type.

consumeUnknownFieldValue_() ⇒ boolean

Attempts to consume the value of an unknown field. This method uses heuristics to try to consume just the right tokens.

consume_(string value) ⇒ boolean

Consumes a token with the given value. If not found, reports an error.

getError() ⇒ ?string
getFieldValue_(?goog.proto2.FieldDescriptor field) ⇒ <Any Type>

Attempts to parse the given field's value from the stream.

getNumberFromString_(string num) ⇒ ?number

Attempts to convert a string to a number.

lookingAtType_(?goog.proto2.TextFormatSerializer.Tokenizer_.TokenTypes type) ⇒ boolean
lookingAt_(string value) ⇒ boolean
parse(?goog.proto2.Message message, string data, boolean= opt_ignoreMissingFields) ⇒ boolean

Parses the given data, filling the message as it goes.

reportError_(string msg)

Reports a parse error.

tryConsume_(string value) ⇒ boolean

Attempts to consume a token with the given string value.