Caplin Trader 5.1.0

Interface: module:ct-element/Parser

module:ct-element/Parser

A Parser is typically used to take a user-input string and convert it to a machine-readable format.

For example, module:ct-element/parser/DateParser can be used to convert user entered date (in a variety of ways) into a machine-readable form.

If the value cannot be parsed then the parser 'fails' by returning null, which allows the Renderer framework to determine the correct sequence of parsers that need to be applied to a value in order to obtain a result. Therefore Parsers, whether applied individually and in combination, are not guaranteed to successfully parse a value.

All Parser implementations are singletons.

Extends

  • module:br-presenter/parser/Parser