Ejemplo n.º 1
0
 private static void WriteVariableDeclaration(BoundVariableDeclaration node, IndentedTextWriter writer)
 {
     writer.WriteKeyword(node.Variable.IsReadOnly ? SyntaxKind.LetKeyword : SyntaxKind.VarKeyword);
     writer.WriteSpace();
     writer.WriteIdentifier(node.Variable.Name);
     writer.WriteSpace();
     writer.WritePunctuation(SyntaxKind.EqualsToken);
     writer.WriteSpace();
     node.Initializer.WriteTo(writer);
     writer.WriteLine();
 }
Ejemplo n.º 2
0
 public static BoundVariableExpression Variable(SyntaxNode syntax, BoundVariableDeclaration variable)
 {
     return(Variable(syntax, variable.Variable));
 }