@@ -117,4 +117,42 @@ module Templating {
117117 result = getScope ( ) .getVariable ( name ) .getAnAccess ( ) .flow ( )
118118 }
119119 }
120+
121+ /**
122+ * A place where a template is instantiated or rendered.
123+ */
124+ class TemplateInstantiaton extends DataFlow:: Node {
125+ TemplateInstantiaton:: Range range ;
126+
127+ TemplateInstantiaton ( ) { this = range }
128+
129+ /** Gets a data flow node that refers to the instantiated template string, if any. */
130+ DataFlow:: SourceNode getOutput ( ) { result = range .getOutput ( ) }
131+
132+ /** Gets a data flow node that refers a template file to be instantiated, if any. */
133+ DataFlow:: Node getTemplateFileNode ( ) { result = range .getTemplateFileNode ( ) }
134+
135+ /** Gets a data flow node that refers to the contents of the template to be instantiated, if any. */
136+ DataFlow:: Node getTemplateContentNode ( ) { result = range .getTemplateContentNode ( ) }
137+
138+ /** Gets a data flow node that refers to an object whose properties become variables in the template. */
139+ DataFlow:: Node getTemplateParamsNode ( ) { result = range .getTemplateParamsNode ( ) }
140+ }
141+
142+ /** Companion module to the `TemplateInstantiation` class. */
143+ module TemplateInstantiaton {
144+ abstract class Range extends DataFlow:: Node {
145+ /** Gets a data flow node that refers to the instantiated template, if any. */
146+ abstract DataFlow:: SourceNode getOutput ( ) ;
147+
148+ /** Gets a data flow node that refers a template file to be instantiated, if any. */
149+ abstract DataFlow:: Node getTemplateFileNode ( ) ;
150+
151+ /** Gets a data flow node that refers to the contents of the template to be instantiated, if any. */
152+ abstract DataFlow:: Node getTemplateContentNode ( ) ;
153+
154+ /** Gets a data flow node that refers to an object whose properties become variables in the template. */
155+ abstract DataFlow:: Node getTemplateParamsNode ( ) ;
156+ }
157+ }
120158}
0 commit comments