colis-anr / morbig

A static parser for POSIX Shell
Other
190 stars 8 forks source link

Wrongly accepted unterminated ${ #116

Open Niols opened 4 years ago

Niols commented 4 years ago
${a-b |

is wrongly accepted by morbig as

[
    "Word",
    "${a-b |}",
    [
        [
            "WordVariable",
            [
                "VariableAtom",
                "a",
                [
                    "UseDefaultValues",
                    "-",
                    [
                        "Word",
                        "b |",
                        [
                            [ "WordLiteral", "b " ],
                            [ "WordLiteral", "|" ]
                        ]
                    ]
                ]
            ]
        ]
    ]
]