mirror of
https://github.com/github/codeql.git
synced 2025-12-21 11:16:30 +01:00
JS: Rename to Angular-style template
This commit is contained in:
@@ -82,8 +82,8 @@ public class ExtractorConfig {
|
||||
/** A CommonJS module that is not also an ES2015 module. */
|
||||
COMMONJS_MODULE,
|
||||
|
||||
/** An Angular template expression. */
|
||||
ANGULAR_TEMPLATE,
|
||||
/** A template expression, using a dialect similar to that of Angular. */
|
||||
ANGULAR_STYLE_TEMPLATE,
|
||||
|
||||
/** Automatically determined source type. */
|
||||
AUTO;
|
||||
@@ -98,7 +98,7 @@ public class ExtractorConfig {
|
||||
*/
|
||||
public Parser createParser(Options options, String input, int startPos) {
|
||||
switch (this) {
|
||||
case ANGULAR_TEMPLATE:
|
||||
case ANGULAR_STYLE_TEMPLATE:
|
||||
return new AngularExpressionParser(options, input, startPos);
|
||||
default:
|
||||
return new CustomParser(options, input, startPos);
|
||||
@@ -118,7 +118,7 @@ public class ExtractorConfig {
|
||||
* variables are implicitly declared in its local scope. Implies {@link #hasLocalScope()}.
|
||||
*/
|
||||
public boolean hasNoGlobalScope() {
|
||||
return this == ANGULAR_TEMPLATE;
|
||||
return this == ANGULAR_STYLE_TEMPLATE;
|
||||
}
|
||||
|
||||
/** Returns true if this source is implicitly in strict mode. */
|
||||
|
||||
@@ -126,8 +126,8 @@ public class HTMLExtractor implements IExtractor {
|
||||
}
|
||||
}
|
||||
extractSnippet(
|
||||
TopLevelKind.ANGULAR_TEMPLATE,
|
||||
config.withSourceType(SourceType.ANGULAR_TEMPLATE),
|
||||
TopLevelKind.ANGULAR_STYLE_TEMPLATE,
|
||||
config.withSourceType(SourceType.ANGULAR_STYLE_TEMPLATE),
|
||||
scopeManager,
|
||||
textualExtractor,
|
||||
source,
|
||||
@@ -437,8 +437,8 @@ public class HTMLExtractor implements IExtractor {
|
||||
int bodyGroup = getNonNullCaptureGroup(m);
|
||||
if (bodyGroup != -1) {
|
||||
extractSnippet(
|
||||
TopLevelKind.ANGULAR_TEMPLATE,
|
||||
config.withSourceType(SourceType.ANGULAR_TEMPLATE),
|
||||
TopLevelKind.ANGULAR_STYLE_TEMPLATE,
|
||||
config.withSourceType(SourceType.ANGULAR_STYLE_TEMPLATE),
|
||||
scopeManager,
|
||||
textualExtractor,
|
||||
m.group(bodyGroup),
|
||||
|
||||
@@ -8,7 +8,7 @@ public enum TopLevelKind {
|
||||
INLINE_SCRIPT(1),
|
||||
EVENT_HANDLER(2),
|
||||
JAVASCRIPT_URL(3),
|
||||
ANGULAR_TEMPLATE(4);
|
||||
ANGULAR_STYLE_TEMPLATE(4);
|
||||
|
||||
private int value;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user