quote static method

String quote(
  1. Expression expression, {
  2. String prefix = '',
  3. String suffix = '',
})

Implementation

static String quote(Expression expression,
    {String prefix = '', String suffix = ''}) {
  var result = '$expression';
  if (expression is SequenceExpression) {
    if (expression.expressions.length > 1) {
      result = '($result)';
    }
  } else if (expression is OrderedChoiceExpression) {
    if (expression.expressions.length > 1) {
      result = '($result)';
    }
  }

  return '$prefix$result$suffix';
}