1 write to _writer
VisualBasicSyntaxGenerator (1)
GreenNodes\GreenNodeFactoryWriter.vb (1)
25
_writer
= writer
68 references to _writer
VisualBasicSyntaxGenerator (68)
GreenNodes\GreenNodeFactoryWriter.vb (68)
37
_writer
.WriteLine()
39
_writer
.WriteLine("Namespace {0}", Ident(_parseTree.NamespaceName) + ".Syntax.InternalSyntax")
40
_writer
.WriteLine()
44
_writer
.WriteLine(" Friend Class {0}", Ident(_parseTree.ContextualFactoryClassName))
47
_writer
.WriteLine(" Friend Partial Class {0}", Ident(_parseTree.FactoryClassName))
50
_writer
.WriteLine()
53
_writer
.WriteLine(" End Class")
56
_writer
.WriteLine("End Namespace")
108
_writer
.WriteLine(" Debug.Assert(SyntaxFacts.Is{0}(kind))", structureName)
112
_writer
.WriteLine(" Debug.Assert({0} IsNot Nothing)", name)
117
_writer
.Write(" Debug.Assert({0} IsNot Nothing", name)
122
_writer
.WriteLine(" AndAlso {0}.Kind = SyntaxKind.{1})", name, childNodeKind.Name)
128
_writer
.WriteLine(" AndAlso {0}.Kind = SyntaxKind.{1})", name, childNodeKind.Name)
130
_writer
.WriteLine(" AndAlso SyntaxFacts.Is{1}({0}.Kind))", name, FactoryName(parent) + child.Name)
133
_writer
.WriteLine(" AndAlso SyntaxFacts.Is{1}({0}.Kind))", name, FactoryName(parent) + child.Name)
136
_writer
.WriteLine(")")
171
_writer
.WriteLine()
172
GenerateSummaryXmlComment(
_writer
, nodeStructure.Description)
178
GenerateParameterXmlComment(
_writer
, "kind", String.Format("A <see cref=""SyntaxKind""/> representing the specific kind of {0}. One of {1}.", nodeStructure.Name, kindsList))
182
GenerateParameterXmlComment(
_writer
, "text", "The actual text of this token.")
186
GenerateParameterXmlComment(
_writer
, LowerFirstCharacter(OptionalChildName(child)), child.Description, escapeText:=True)
189
_writer
.Write(
201
_writer
.Write("kind As {0}", NodeKindType())
207
If needComma Then
_writer
.Write(", ")
208
_writer
.Write("text as String")
214
If needComma Then
_writer
.Write(", ")
219
If needComma Then
_writer
.Write(", ")
226
If needComma Then
_writer
.Write(", ") : needComma = False
227
_writer
.Write("leadingTrivia As GreenNode, trailingTrivia As GreenNode", StructureTypeName(_parseTree.RootStructure))
231
_writer
.WriteLine(") As {0}", StructureTypeName(nodeStructure))
270
_writer
.Write(" Return New {0}(", StructureTypeName(nodeStructure))
272
_writer
.WriteLine(")")
275
_writer
.WriteLine("")
277
_writer
.WriteLine(" Dim hash As Integer")
282
_writer
.Write(" Dim cached = VisualBasicSyntaxNodeCache.TryGetNode(")
284
_writer
.Write(" Dim cached = SyntaxNodeCache.TryGetNode(")
288
_writer
.WriteLine(", hash)")
291
_writer
.WriteLine(" If cached IsNot Nothing Then")
293
_writer
.WriteLine(" Return DirectCast(cached, {0})", StructureTypeName(nodeStructure))
295
_writer
.WriteLine(" End If")
296
_writer
.WriteLine("")
299
_writer
.Write(" Dim result = New {0}(", StructureTypeName(nodeStructure))
301
_writer
.WriteLine(")")
303
_writer
.WriteLine(" If hash >= 0 Then")
305
_writer
.WriteLine(" SyntaxNodeCache.AddNode(result, hash)")
307
_writer
.WriteLine(" End If")
308
_writer
.WriteLine("")
311
_writer
.WriteLine(" Return result")
317
_writer
.WriteLine(" End Function")
318
_writer
.WriteLine()
329
_writer
.Write("kind")
331
_writer
.Write("{0}.{1}", NodeKindType(), Ident(nodeKind.Name))
336
_writer
.Write(", text")
341
_writer
.Write(", leadingTrivia, trailingTrivia")
346
_writer
.Write(", {0}", FieldParamName(field, factoryFunctionName))
351
_writer
.Write(", Nothing")
354
_writer
.Write(", {0}.Node", ChildParamName(child, factoryFunctionName))
356
_writer
.Write(", {0}.Node)", ChildParamName(child, factoryFunctionName), ChildConstructorTypeRef(child, True))
358
_writer
.Write(", {0}", ChildParamName(child, factoryFunctionName))
364
_writer
.Write(", _factoryContext")
370
_writer
.Write("{0} As {1}", FieldParamName(field, conflictName), FieldTypeRef(field))
375
_writer
.Write("{0} As {1}", ChildParamName(child, conflictName), ChildFactoryTypeRef(node, child, True, True))
379
_writer
.WriteLine()
380
_writer
.WriteLine(" Private ReadOnly _factoryContext As ISyntaxFactoryContext")
381
_writer
.WriteLine()
382
_writer
.WriteLine(" Sub New(factoryContext As ISyntaxFactoryContext)")
383
_writer
.WriteLine(" _factoryContext = factoryContext")
384
_writer
.WriteLine(" End Sub")