JS: Rename to Angular-style template

This commit is contained in:
Asger Feldthaus
2021-07-20 10:48:29 +02:00
parent 66cec65bfb
commit f26e94c0db
6 changed files with 14 additions and 14 deletions

View File

@@ -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. */

View File

@@ -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),

View File

@@ -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;