Skip to content

marketforce-info/message-format-parser

Repository files navigation

MarketforceInfo/Message-Format-Parser

Code Checks Latest Stable Version Total Downloads Licence

Description

Parses ICU message format syntax into an abstract syntax tree. Can be used for transformation or validation.


Installation

$ composer require marketforce-info/message-format-parser

Usage

Basic

$message = "Welcome {name} to the club."
$ast = (new MarketforceInfo\MessageFormatParser\Parser())->parse($message)

Naming convention

Pattern

This is my {main_message} to everyone.
\_________/\____________/\___________/
  literal     argument      literal

Argument

{name[, format[, options]]}

Formats

Number

Syntax Support

Contributions gratefully accepted in the form issues or PRs.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.

About

Parses ICU message format syntax into an abstract syntax tree.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages