22 using System.Collections.Generic;
29 namespace Ntp.Analyzer.Config.Syntax
36 graphs =
new List<ISyntaxNode>();
40 private readonly List<ISyntaxNode>
graphs;
48 var list =
new List<GraphBaseConfiguration>();
49 foreach (var graph
in graphs)
53 list.
Add((graph as HostGraphSyntaxNode).Compile());
57 list.Add((graph as TrafficGraphSyntaxNode).Compile());
61 list.Add((graph as PeerGraphSyntaxNode).Compile());
65 AddError(
"Internal error in configuration compiler: GraphSetConfiguration");
81 Where(n => n.Symbol ==
Symbol.KeywordGraph).
82 Cast<StringSettingNode>().
83 Select(graph => table.
Lookup(graph.Value))
89 CheckIsUnique(
new List<Symbol>
95 CheckAllIsPresent(
new List<Symbol> {
Symbol.KeywordGraph});
104 foreach (var graph
in graphNames)
106 var reference = table.Lookup(graph.Value);
107 if (reference == null)
109 AddReferenceNameError(graph, keyword, graph.Value);
111 else if (owner ==
Symbol.KeywordHostPage &&
114 AddReferenceTypeError(graph, keyword, keyword, graph.Value);
118 AddReferenceTypeError(graph, keyword, peerGraphWord, graph.Value);
125 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordLinkIndex);
126 CheckTypeIs<StringSettingNode>(
Symbol.KeywordTitle);
127 CheckTypeIs<StringSettingNode>(
Symbol.KeywordGraph);
override GraphSetConfiguration InternalCompile()
static Keyword Find(Symbol symbol)
override void InternalResolve(SymbolTable table)
override void ValidateReferences(SymbolTable table)
void Add(ISyntaxNode node)
override void ValidateMandatories()
Override to validates the mandatory types in this syntax node.
override void ValidateTypes()
Override to validates the types in this syntax node.
GraphSetSyntaxNode(string name, Symbol owner, int line)
ISyntaxNode Lookup(string name)
readonly List< ISyntaxNode > graphs