Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ Compile()

QilExpression System.Xml.Xsl.Xslt.QilGenerator.Compile ( Compiler compiler)
inlineprivate

Definition at line 210 of file QilGenerator.cs.

211 {
217 new XslAstRewriter().Rewrite(compiler);
218 if (!IsDebug)
219 {
220 new XslAstAnalyzer().Analyze(compiler);
221 }
223 try
224 {
225 CompileKeys();
226 CompileAndSortMatches(compiler.Root.Imports[0]);
229 foreach (ProtoTemplate allTemplate in compiler.AllTemplates)
230 {
232 }
233 }
234 catch (XslLoadException ex)
235 {
236 ex.SetSourceLineInfo(_lastScope.SourceLine);
237 throw;
238 }
239 catch (Exception ex2)
240 {
241 if (!XmlException.IsCatchableException(ex2))
242 {
243 throw;
244 }
245 throw new XslLoadException(ex2, _lastScope.SourceLine);
246 }
248 QilNode root = CompileRootExpression(compiler.StartApplyTemplates);
249 foreach (ProtoTemplate allTemplate2 in compiler.AllTemplates)
250 {
251 foreach (QilParameter argument in allTemplate2.Function.Arguments)
252 {
253 if (!IsDebug || argument.Name.Equals(_nameNamespaces))
254 {
256 }
257 }
258 }
259 Scripts.TrimSafeDictionary scriptClasses = compiler.Scripts.ScriptClasses;
261 foreach (string key in scriptClasses.Keys)
262 {
264 if (type != null)
265 {
267 }
268 }
274 qilExpression.WhitespaceRules = compiler.WhitespaceRules;
278 return qilExpression;
279 }
void Add(TKey key, TValue value)
static void Check(QilNode input)
QilExpression QilExpression(QilNode root, QilFactory factory)
readonly XsltQilFactory _f
void CompileProtoTemplate(ProtoTemplate tmpl)
QilNode CompileRootExpression(XslNode applyTmpls)
void CompileAndSortMatches(Stylesheet sheet)
ISourceLineInfo SourceLine
Definition XslNode.cs:10

References System.Xml.Xsl.Xslt.QilGenerator._compiler, System.Xml.Xsl.Xslt.QilGenerator._extPars, System.Xml.Xsl.Xslt.QilGenerator._f, System.Xml.Xsl.Xslt.QilGenerator._functions, System.Xml.Xsl.Xslt.QilGenerator._gloVars, System.Xml.Xsl.Xslt.QilGenerator._lastScope, System.Xml.Xsl.Xslt.QilGenerator._nameNamespaces, System.Xml.Xsl.Xslt.QilGenerator._nsVars, System.Collections.Generic.Dictionary< TKey, TValue >.Add(), System.Xml.Xsl.Xslt.XslAstAnalyzer.Analyze(), System.Xml.Xsl.Qil.QilPatternFactory.BaseFactory, System.Xml.Xsl.Qil.QilDepthChecker.Check(), System.Xml.Xsl.Xslt.QilGenerator.CompileAndSortMatches(), System.Xml.Xsl.Xslt.QilGenerator.CompileGlobalVariables(), System.Xml.Xsl.Xslt.QilGenerator.CompileInitializationCode(), System.Xml.Xsl.Xslt.QilGenerator.CompileKeys(), System.Xml.Xsl.Xslt.QilGenerator.CompileProtoTemplate(), System.Xml.Xsl.Xslt.QilGenerator.CompileRootExpression(), System.Collections.Generic.Dictionary< TKey, TValue >.Count, System.Xml.Xsl.Xslt.QilGenerator.CreateGlobalVarPars(), System.Xml.Dictionary, System.Xml.Xsl.Qil.QilPatternFactory.FunctionList(), System.Xml.Xsl.Qil.QilPatternFactory.GlobalParameterList(), System.Xml.Xsl.Qil.QilPatternFactory.GlobalVariableList(), System.Xml.XmlException.IsCatchableException(), System.Xml.Xsl.Xslt.QilGenerator.IsDebug, System.key, System.Collections.Generic.Dictionary< TKey, TValue >.Keys, System.list, System.Xml.Xsl.Xslt.QilGenerator.PrecompileProtoTemplatesHeaders(), System.Xml.Xsl.Qil.QilPatternFactory.QilExpression(), System.Xml.Xsl.Xslt.XslAstRewriter.Rewrite(), System.Xml.Xsl.Xslt.XslNode.SourceLine, and System.type.