23 using System.Collections.Generic;
30 namespace Ntp.Analyzer.Config.Syntax
46 var fixedRun = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordFixedRun) as BooleanSettingNode;
49 var pageTemplate = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordPageTemplate) as
PageThemeNode;
61 graphSets.Select(g => g.Compile()),
76 CheckIsUnique(
new List<Symbol>
85 Symbol.KeywordPageTemplate,
89 CheckOnlyOneIsPresent(
new List<Symbol>
95 CheckAllIsPresent(
new List<Symbol>
106 if (pageName != null)
110 var reference = table.
Lookup(pageName.Value);
111 if (reference == null)
113 AddReferenceNameError(pageName, keyword, pageName.Value);
117 AddReferenceTypeError(pageName, keyword, keyword, pageName.Value);
121 var link = Nodes.SingleOrDefault(n => n.Symbol ==
Symbol.KeywordLink) as StringSettingNode;
126 location = CheckLink(link.Value, linkKeyword);
131 CheckTypeIs<IntegerSettingNode>(
Symbol.KeywordFrequency);
132 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordInitialRun);
133 CheckTypeIs<BooleanSettingNode>(
Symbol.KeywordFixedRun);
134 CheckTypeIs<StringSettingNode>(
Symbol.KeywordTitle);
135 CheckTypeIs<StringSettingNode>(
Symbol.KeywordPageTitle);
136 CheckTypeIs<StringSettingNode>(
Symbol.KeywordPeerPage);
137 CheckTypeIs<StringSettingNode>(
Symbol.KeywordLink);
138 CheckTypeIs<PageThemeNode>(
Symbol.KeywordPageTemplate);
override void ValidateMandatories()
Override to validates the mandatory types in this syntax node.
static Keyword Find(Symbol symbol)
override void ValidateTypes()
Override to validates the types in this syntax node.
override PeerSummaryPageConfiguration InternalCompile()
PeerPageSyntaxNode pageNode
override void ValidateReferences(SymbolTable table)
PeerSummaryPageSyntaxNode(string name, int line)
override void InternalResolve(SymbolTable table)
ISyntaxNode Lookup(string name)