fluent-syntax 0.9.2

Parser/Serializer tools for Fluent Syntax.
Documentation
{
    "type": "Resource",
    "body": [
        {
            "type": "Message",
            "id": {
                "type": "Identifier",
                "name": "simple-identifier"
            },
            "value": {
                "type": "Pattern",
                "elements": [
                    {
                        "type": "Placeable",
                        "expression": {
                            "type": "SelectExpression",
                            "selector": {
                                "type": "VariableReference",
                                "id": {
                                    "type": "Identifier",
                                    "name": "sel"
                                }
                            },
                            "variants": [
                                {
                                    "type": "Variant",
                                    "key": {
                                        "type": "Identifier",
                                        "name": "key"
                                    },
                                    "value": {
                                        "type": "Pattern",
                                        "elements": [
                                            {
                                                "type": "TextElement",
                                                "value": "value"
                                            }
                                        ]
                                    },
                                    "default": true
                                }
                            ]
                        }
                    }
                ]
            },
            "attributes": [],
            "comment": null
        },
        {
            "type": "Message",
            "id": {
                "type": "Identifier",
                "name": "identifier-surrounded-by-whitespace"
            },
            "value": {
                "type": "Pattern",
                "elements": [
                    {
                        "type": "Placeable",
                        "expression": {
                            "type": "SelectExpression",
                            "selector": {
                                "type": "VariableReference",
                                "id": {
                                    "type": "Identifier",
                                    "name": "sel"
                                }
                            },
                            "variants": [
                                {
                                    "type": "Variant",
                                    "key": {
                                        "type": "Identifier",
                                        "name": "key"
                                    },
                                    "value": {
                                        "type": "Pattern",
                                        "elements": [
                                            {
                                                "type": "TextElement",
                                                "value": "value"
                                            }
                                        ]
                                    },
                                    "default": true
                                }
                            ]
                        }
                    }
                ]
            },
            "attributes": [],
            "comment": null
        },
        {
            "type": "Message",
            "id": {
                "type": "Identifier",
                "name": "int-number"
            },
            "value": {
                "type": "Pattern",
                "elements": [
                    {
                        "type": "Placeable",
                        "expression": {
                            "type": "SelectExpression",
                            "selector": {
                                "type": "VariableReference",
                                "id": {
                                    "type": "Identifier",
                                    "name": "sel"
                                }
                            },
                            "variants": [
                                {
                                    "type": "Variant",
                                    "key": {
                                        "value": "1",
                                        "type": "NumberLiteral"
                                    },
                                    "value": {
                                        "type": "Pattern",
                                        "elements": [
                                            {
                                                "type": "TextElement",
                                                "value": "value"
                                            }
                                        ]
                                    },
                                    "default": true
                                }
                            ]
                        }
                    }
                ]
            },
            "attributes": [],
            "comment": null
        },
        {
            "type": "Message",
            "id": {
                "type": "Identifier",
                "name": "float-number"
            },
            "value": {
                "type": "Pattern",
                "elements": [
                    {
                        "type": "Placeable",
                        "expression": {
                            "type": "SelectExpression",
                            "selector": {
                                "type": "VariableReference",
                                "id": {
                                    "type": "Identifier",
                                    "name": "sel"
                                }
                            },
                            "variants": [
                                {
                                    "type": "Variant",
                                    "key": {
                                        "value": "3.14",
                                        "type": "NumberLiteral"
                                    },
                                    "value": {
                                        "type": "Pattern",
                                        "elements": [
                                            {
                                                "type": "TextElement",
                                                "value": "value"
                                            }
                                        ]
                                    },
                                    "default": true
                                }
                            ]
                        }
                    }
                ]
            },
            "attributes": [],
            "comment": null
        },
        {
            "type": "Comment",
            "content": "ERROR"
        },
        {
            "type": "Junk",
            "annotations": [],
            "content": "invalid-identifier =\n    { $sel ->\n       *[two words] value\n    }\n\n"
        },
        {
            "type": "Comment",
            "content": "ERROR"
        },
        {
            "type": "Junk",
            "annotations": [],
            "content": "invalid-int =\n    { $sel ->\n       *[1 apple] value\n    }\n\n"
        },
        {
            "type": "Comment",
            "content": "ERROR"
        },
        {
            "type": "Junk",
            "annotations": [],
            "content": "invalid-int =\n    { $sel ->\n       *[3.14 apples] value\n    }\n"
        }
    ]
}