|
9 | 9 | import java.util.regex.Pattern; |
10 | 10 |
|
11 | 11 | import com.semmle.extractor.html.HtmlPopulator; |
| 12 | +import com.semmle.js.extractor.ExtractorConfig.ECMAVersion; |
12 | 13 | import com.semmle.js.extractor.ExtractorConfig.Platform; |
13 | 14 | import com.semmle.js.extractor.ExtractorConfig.SourceType; |
14 | 15 | import com.semmle.js.parser.ParseError; |
@@ -96,7 +97,6 @@ public void handleElement(Element elt, HtmlPopulator.Context context) { |
96 | 97 |
|
97 | 98 | extractTemplateTags( |
98 | 99 | textualExtractor, |
99 | | - scopeManager, |
100 | 100 | attr.getSource(), |
101 | 101 | attr.getBegin(), |
102 | 102 | attr.getEnd(), |
@@ -154,7 +154,7 @@ public void handleElement(Element elt, HtmlPopulator.Context context) { |
154 | 154 | public void handleText( |
155 | 155 | Source src, int textBegin, int textEnd, Label parentLabel, boolean isCData) { |
156 | 156 | extractTemplateTags( |
157 | | - textualExtractor, scopeManager, src, textBegin, textEnd, () -> parentLabel); |
| 157 | + textualExtractor, src, textBegin, textEnd, () -> parentLabel); |
158 | 158 | } |
159 | 159 |
|
160 | 160 | @Override |
@@ -384,7 +384,6 @@ private void emitTopLevelXmlNodeBinding( |
384 | 384 |
|
385 | 385 | private void extractTemplateTags( |
386 | 386 | TextualExtractor textualExtractor, |
387 | | - ScopeManager scopeManager, |
388 | 387 | Source root, |
389 | 388 | int start, |
390 | 389 | int end, |
@@ -421,7 +420,7 @@ private void extractTemplateTags( |
421 | 420 | extractSnippet( |
422 | 421 | TopLevelKind.ANGULAR_STYLE_TEMPLATE, |
423 | 422 | config.withSourceType(SourceType.ANGULAR_STYLE_TEMPLATE), |
424 | | - scopeManager, |
| 423 | + new ScopeManager(textualExtractor.getTrapwriter(), ECMAVersion.ECMA2020, true), |
425 | 424 | textualExtractor, |
426 | 425 | m.group(bodyGroup), |
427 | 426 | m.start(bodyGroup), |
|
0 commit comments