Mvt Expression Parser
object MvtExpressionParser
Parses Mapbox-GL JSON expression arrays into MvtExpression trees. Supports the subset documented on MvtExpression (literals + sources + comparisons + boolean + arithmetic + case/match/step + interpolate + coercion).
Two typed entry-points cover the paint-property use cases:
parseFloat — for numeric properties (
line-width,text-size,text-halo-width).parseColor — for color properties (
fill-color,line-color,text-color).
Sub-expressions used inside conditionals/branches are parsed via parseAny, whose concrete value type depends on the leaf literals encountered.
Unsupported operators return null; the caller decides whether that falls back to a default or skips the property entirely.