78 references to Node
CSharpSyntaxGenerator (78)
AbstractFileWriter.cs (7)
22
private readonly IDictionary<string,
Node
> _nodeMap;
33
_nodeMap = tree.Types.OfType<
Node
>().ToDictionary(n => n.Name);
230
protected static bool IsRoot(
Node
n)
240
protected
Node
GetNode(string typeName)
241
=> _nodeMap.TryGetValue(typeName, out
var
node) ? node : null;
258
protected static bool HasErrors(
Node
n)
382
Node
node => node.Fields,
Model\Tree.cs (1)
18
[XmlElement(ElementName = "Node", Type = typeof(
Node
))]
SignatureWriter.cs (3)
77
else if (node is
Node
)
79
Node
nd = (
Node
)node;
SourceWriter.cs (57)
146
else if (node is
Node
)
148
var
nd = (
Node
)node;
292
private void WriteCtorBody(
Node
node, List<Field> valueFields, List<Field> nodeFields)
325
private void WriteSetAnnotations(
Node
node)
338
private void WriteSetDiagnostics(
Node
node)
351
private void WriteGreenAcceptMethods(
Node
node)
371
foreach (
var
node in nodes.OfType<
Node
>())
378
private void WriteGreenUpdateMethod(
Node
node)
440
foreach (
var
node in nodes.OfType<
Node
>())
504
foreach (
var
node in nodes.OfType<
Node
>())
511
private void WriteGreenFactory(
Node
nd, bool withSyntaxFactoryContext = false)
651
private void WriteGreenFactoryParameters(
Node
nd)
668
private void WriteCtorArgList(
Node
nd, bool withSyntaxFactoryContext, List<Field> valueFields, List<Field> nodeFields)
694
: node is
Node
nd
736
var
referencedNode = TryGetNodeForNestedList(field);
786
var
referencedNode = TryGetNodeForNestedList(baseField);
807
else if (node is
Node
)
809
var
nd = (
Node
)node;
1039
private void WriteRedAcceptMethods(
Node
node)
1046
private void WriteRedAcceptMethod(
Node
node, bool genericResult)
1067
foreach (
var
node in nodes.OfType<
Node
>())
1078
private void WriteRedUpdateMethod(
Node
node)
1118
private void WriteRedWithMethods(
Node
node)
1178
: node is
Node
n
1182
private void WriteRedListHelperMethods(
Node
node)
1199
var
referencedNode = TryGetNodeForNestedList(field);
1220
private
Node
TryGetNodeForNestedList(Field field)
1222
Node
referencedNode = GetNode(field.Type);
1231
private void WriteRedListHelperMethods(
Node
node, Field field)
1250
private void WriteRedNestedListHelperMethods(
Node
node, Field field,
Node
referencedNode, Field referencedNodeField)
1293
foreach (
var
node in nodes.OfType<
Node
>())
1332
var nodes = Tree.Types.Where(n => n is not PredefinedNode and not AbstractNode).OfType<
Node
>().ToList();
1337
foreach (
var
node in nodes)
1353
protected bool CanBeAutoCreated(
Node
node, Field field)
1356
private bool IsAutoCreatableToken(
Node
node, Field field)
1365
var
referencedNode = GetNode(field.Type);
1369
private bool IsRequiredFactoryField(
Node
node, Field field)
1379
private int RequiredFactoryArgumentCount(
Node
nd, bool includeKind = true)
1400
private int OptionalFactoryArgumentCount(
Node
nd)
1415
private void WriteRedFactory(
Node
nd)
1516
private void WriteRedFactoryParameters(
Node
nd)
1532
private string GetDefaultValue(
Node
nd, Field field)
1555
var
referencedNode = GetNode(field.Type);
1561
private void WriteKindConverters(
Node
nd)
1587
private IEnumerable<Field> DetermineRedFactoryWithNoAutoCreatableTokenFields(
Node
nd)
1593
private void WriteRedFactoryWithNoAutoCreatableTokens(
Node
nd)
1626
private Field DetermineMinimalOptionalField(
Node
nd)
1654
private IEnumerable<Field> DetermineMinimalFactoryFields(
Node
nd)
1676
private void WriteRedMinimalFactory(
Node
nd, bool withStringNames = false)
TestWriter.cs (9)
91
WriteNodeGenerator((
Node
)node, isGreen);
95
private void WriteNodeGenerator(
Node
node, bool isGreen)
223
WriteFactoryPropertyTest((
Node
)node, isGreen);
227
private void WriteFactoryPropertyTest(
Node
node, bool isGreen)
331
WriteTokenDeleteRewriterTest((
Node
)node);
333
WriteIdentityRewriterTest((
Node
)node);
337
private void WriteTokenDeleteRewriterTest(
Node
node)
365
private void WriteIdentityRewriterTest(
Node
node)
388
private string ChooseValidKind(Field field,
Node
nd)
TreeFlattening.cs (1)
21
case
Node
node: