Inheritance: ICommentFormatter
Ejemplo n.º 1
0
 public static UnparseControl Create(Grammar grammar, Formatter defaultFormatter, params ParenthesizedExpression[] parenthesizedExpressionsForPrecedenceBasedUnparse)
 {
     return new UnparseControl(grammar)
     {
         ExpressionToParenthesesHasBeenSet = true,
         DefaultFormatter = defaultFormatter,
         expressionToParentheses = parenthesizedExpressionsForPrecedenceBasedUnparse.ToDictionary(parenthesizedExpression => parenthesizedExpression.Expression)
     };
 }
Ejemplo n.º 2
0
 public static string AsText(this IEnumerable<Utoken> utokens, Formatter formatter)
 {
     return string.Concat(utokens.Select(utoken => utoken.ToText(formatter)));
 }
Ejemplo n.º 3
0
 public static void WriteToStream(this IEnumerable<Utoken> utokens, Stream stream, Formatter formatter)
 {
     using (StreamWriter sw = new StreamWriter(stream))
     {
         foreach (Utoken utoken in utokens)
             sw.Write(utoken.ToText(formatter));
     }
 }
Ejemplo n.º 4
0
        private FormatYielder(FormatYielder that)
        {
            this.formatter = that.formatter;

            this.direction = that.direction;
        }
Ejemplo n.º 5
0
 public FormatYielder(Formatter formatter)
 {
     this.formatter = formatter;
 }