Inheritance: ICommentFormatter
Esempio 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)
     };
 }
Esempio n. 2
0
 public static string AsText(this IEnumerable<Utoken> utokens, Formatter formatter)
 {
     return string.Concat(utokens.Select(utoken => utoken.ToText(formatter)));
 }
Esempio 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));
     }
 }
Esempio n. 4
0
        private FormatYielder(FormatYielder that)
        {
            this.formatter = that.formatter;

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