expose expression and function/variable name parser
I need to only parse an expression or variable name. Did you consider exposing those parsers?
I've considered those. The main thing that needs to be tackled in that sense is the post processing of the parse.
By default an incorrect syntax tree is parsed, while some knowledge such as operator precedence is not available (that a + b * c is represented as tress as a + (b * c) instead of ( a + b) * c).
This was mainly a challenge in earlier versions of Elm where users could define their own operators. However, elm-syntax was always designed to parse files in packages that are owned by elm (such as elm/core, elm/browser and elm/parser). These packages still define operators and thus this processing is taken into account.
A good design should be thought out to realise this.