surroundedByCurlyBraces method

Parser<T> surroundedByCurlyBraces(
  1. {T defaultValue}
)

Implementation

Parser<T> surroundedByCurlyBraces({T defaultValue}) => opt()
    .surroundedBy(match('{').space(), match('}').space())
    .map((r) => r.value ?? defaultValue);