Version 2.14.0-184.0.dev
Merge commit '47e4b4f2d916a302826b94fdd48b16743d3af79a' into 'dev'
diff --git a/pkg/analyzer/lib/src/dart/analysis/driver.dart b/pkg/analyzer/lib/src/dart/analysis/driver.dart
index 745683b..fc48be7 100644
--- a/pkg/analyzer/lib/src/dart/analysis/driver.dart
+++ b/pkg/analyzer/lib/src/dart/analysis/driver.dart
@@ -84,9 +84,6 @@
/// The version of data format, should be incremented on every format change.
static const int DATA_VERSION = 143;
- /// The length of the list returned by [_computeDeclaredVariablesSignature].
- static const int _declaredVariablesSignatureLength = 4;
-
/// The number of exception contexts allowed to write. Once this field is
/// zero, we stop writing any new exception contexts in this process.
static int allowedNumberOfContextsToWrite = 10;
@@ -132,19 +129,13 @@
api.AnalysisContext? analysisContext;
/// The salt to mix into all hashes used as keys for unlinked data.
- final Uint32List _saltForUnlinked =
- Uint32List(2 + AnalysisOptionsImpl.signatureLength);
+ Uint32List _saltForUnlinked = Uint32List(0);
/// The salt to mix into all hashes used as keys for elements.
- final Uint32List _saltForElements = Uint32List(1 +
- AnalysisOptionsImpl.signatureLength +
- _declaredVariablesSignatureLength);
+ Uint32List _saltForElements = Uint32List(0);
/// The salt to mix into all hashes used as keys for linked data.
- final Uint32List _saltForResolution = Uint32List(3 +
- AnalysisOptionsImpl.signatureLength +
- AnalysisOptionsImpl.signatureLength +
- _declaredVariablesSignatureLength);
+ Uint32List _saltForResolution = Uint32List(0);
/// The set of priority files, that should be analyzed sooner.
final _priorityFiles = <String>{};
@@ -993,8 +984,11 @@
ApiSignature getResolvedUnitKeyByPath(String path) {
_throwIfNotAbsolutePath(path);
- ApiSignature signature = getUnitKeyByPath(path);
var file = fsState.getFileForPath(path);
+
+ var signature = ApiSignature();
+ signature.addUint32List(_saltForResolution);
+ signature.addString(file.transitiveSignature);
signature.addString(file.contentHash);
return signature;
}
@@ -1154,15 +1148,6 @@
return completer.future;
}
- ApiSignature getUnitKeyByPath(String path) {
- _throwIfNotAbsolutePath(path);
- var file = fsState.getFileForPath(path);
- ApiSignature signature = ApiSignature();
- signature.addUint32List(_saltForResolution);
- signature.addString(file.transitiveSignature);
- return signature;
- }
-
/// Return `true` is the file with the given absolute [uri] is a library,
/// or `false` if it is a part. More specifically, return `true` if the file
/// is not known to be a part.
@@ -1528,6 +1513,17 @@
_changeHook(null);
}
+ void _addDeclaredVariablesToSignature(ApiSignature buffer) {
+ var variableNames = declaredVariables.variableNames;
+ buffer.addInt(variableNames.length);
+
+ for (var name in variableNames) {
+ var value = declaredVariables.get(name);
+ buffer.addString(name);
+ buffer.addString(value!);
+ }
+ }
+
/// Implementation for [changeFile].
void _changeFile(String path) {
_fileTracker.changeFile(path);
@@ -1660,22 +1656,6 @@
});
}
- Uint32List _computeDeclaredVariablesSignature() {
- var buffer = ApiSignature();
-
- var variableNames = declaredVariables.variableNames;
- buffer.addInt(variableNames.length);
-
- for (var name in variableNames) {
- var value = declaredVariables.get(name);
- buffer.addString(name);
- buffer.addString(value!);
- }
-
- var bytes = buffer.toByteList();
- return Uint8List.fromList(bytes).buffer.asUint32List();
- }
-
ErrorsResult? _computeErrors({
required String path,
required bool asIsIfPartWithoutLibrary,
@@ -1877,60 +1857,38 @@
}
void _fillSaltForElements() {
- var index = 0;
-
- _saltForElements[index] = DATA_VERSION;
- index++;
-
- _saltForElements.setAll(index, _analysisOptions.signatureForElements);
- index += AnalysisOptionsImpl.signatureLength;
-
- _saltForResolution.setAll(index, _computeDeclaredVariablesSignature());
- index += _declaredVariablesSignatureLength;
+ var buffer = ApiSignature();
+ buffer.addInt(DATA_VERSION);
+ buffer.addUint32List(_analysisOptions.signatureForElements);
+ _addDeclaredVariablesToSignature(buffer);
+ _saltForElements = buffer.toUint32List();
}
void _fillSaltForResolution() {
- var index = 0;
+ var buffer = ApiSignature();
+ buffer.addInt(DATA_VERSION);
+ buffer.addBool(enableIndex);
+ buffer.addBool(enableDebugResolutionMarkers);
+ buffer.addUint32List(_analysisOptions.signature);
+ _addDeclaredVariablesToSignature(buffer);
- _saltForResolution[index] = DATA_VERSION;
- index++;
-
- _saltForResolution[index] = enableIndex ? 1 : 0;
- index++;
-
- _saltForResolution[index] = enableDebugResolutionMarkers ? 1 : 0;
- index++;
-
- // TODO(scheglov) Just combine everything into one signature.
{
- var buffer = ApiSignature();
-
var workspace = analysisContext?.contextRoot.workspace;
// TODO(scheglov) Generalize?
if (workspace is PubWorkspace) {
buffer.addString(workspace.pubspecContent ?? '');
}
-
- var bytes = buffer.toByteList();
- _saltForResolution.setAll(
- index,
- // TODO(scheglov) Add a special method to ApiSignature?
- Uint8List.fromList(bytes).buffer.asUint32List(),
- );
- index += AnalysisOptionsImpl.signatureLength;
}
- _saltForResolution.setAll(index, _analysisOptions.signature);
- index += AnalysisOptionsImpl.signatureLength;
-
- _saltForResolution.setAll(index, _computeDeclaredVariablesSignature());
- index += _declaredVariablesSignatureLength;
+ _saltForResolution = buffer.toUint32List();
}
void _fillSaltForUnlinked() {
- _saltForUnlinked[0] = DATA_VERSION;
- _saltForUnlinked[1] = enableIndex ? 1 : 0;
- _saltForUnlinked.setAll(2, _analysisOptions.unlinkedSignature);
+ var buffer = ApiSignature();
+ buffer.addInt(DATA_VERSION);
+ buffer.addBool(enableIndex);
+ buffer.addUint32List(_analysisOptions.unlinkedSignature);
+ _saltForUnlinked = buffer.toUint32List();
}
/// Load the [AnalysisResult] for the given [file] from the [bytes]. Set
diff --git a/pkg/analyzer/lib/src/dart/element/element.dart b/pkg/analyzer/lib/src/dart/element/element.dart
index b8b5942..8f4798d 100644
--- a/pkg/analyzer/lib/src/dart/element/element.dart
+++ b/pkg/analyzer/lib/src/dart/element/element.dart
@@ -885,17 +885,17 @@
var isNamed = superclassConstructor.name.isNotEmpty;
implicitConstructor.constantInitializers = [
astFactory.superConstructorInvocation(
- Tokens.SUPER,
- isNamed ? Tokens.PERIOD : null,
+ Tokens.super_(),
+ isNamed ? Tokens.period() : null,
isNamed
? (astFactory.simpleIdentifier(
StringToken(TokenType.STRING, superclassConstructor.name, -1),
)..staticElement = superclassConstructor)
: null,
astFactory.argumentList(
- Tokens.OPEN_PAREN,
+ Tokens.openParenthesis(),
argumentsForSuperInvocation,
- Tokens.CLOSE_PAREN,
+ Tokens.closeParenthesis(),
),
)..staticElement = superclassConstructor,
];
diff --git a/pkg/analyzer/lib/src/fasta/ast_builder.dart b/pkg/analyzer/lib/src/fasta/ast_builder.dart
index 2ea4f04..5bdd4c2 100644
--- a/pkg/analyzer/lib/src/fasta/ast_builder.dart
+++ b/pkg/analyzer/lib/src/fasta/ast_builder.dart
@@ -248,13 +248,13 @@
extensionKeyword: extensionKeyword,
name: name,
typeParameters: typeParameters,
- onKeyword: Tokens.ON,
+ onKeyword: Tokens.on_(),
extendedType: ast.typeName(
_tmpSimpleIdentifier(),
null,
), // extendedType is set in [endExtensionDeclaration]
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
+ rightBracket: Tokens.closeCurlyBracket(),
members: [],
);
@@ -1670,7 +1670,7 @@
asKeyword,
prefix,
combinators,
- semicolon ?? Tokens.SEMICOLON));
+ semicolon ?? Tokens.semicolon()));
}
@override
@@ -2344,7 +2344,7 @@
type: type,
variables: variables,
),
- semicolon ?? Tokens.SEMICOLON));
+ semicolon ?? Tokens.semicolon()));
}
@override
@@ -2528,9 +2528,9 @@
extendsClause,
withClause,
implementsClause,
- Tokens.OPEN_CURLY_BRACKET, // leftBracket
+ Tokens.openCurlyBracket(), // leftBracket
<ClassMember>[],
- Tokens.CLOSE_CURLY_BRACKET, // rightBracket
+ Tokens.closeCurlyBracket(), // rightBracket
);
classDeclaration!.nativeClause = nativeClause;
@@ -3166,9 +3166,9 @@
typeParameters,
onClause,
implementsClause,
- Tokens.OPEN_CURLY_BRACKET, // leftBracket
+ Tokens.openCurlyBracket(), // leftBracket
<ClassMember>[],
- Tokens.CLOSE_CURLY_BRACKET, // rightBracket
+ Tokens.closeCurlyBracket(), // rightBracket
);
declarations.add(mixinDeclaration!);
}
diff --git a/pkg/analyzer/lib/src/generated/engine.dart b/pkg/analyzer/lib/src/generated/engine.dart
index 3b4543e..7f04b64 100644
--- a/pkg/analyzer/lib/src/generated/engine.dart
+++ b/pkg/analyzer/lib/src/generated/engine.dart
@@ -187,8 +187,6 @@
VersionConstraint? get sdkVersionConstraint;
/// Return the opaque signature of the options.
- ///
- /// The length of the list is guaranteed to equal [signatureLength].
Uint32List get signature;
/// Return `true` if analyzer should use the Dart 2.0 Front End parser.
@@ -199,8 +197,6 @@
/// Determine whether two signatures returned by [signature] are equal.
static bool signaturesEqual(Uint32List a, Uint32List b) {
- assert(a.length == AnalysisOptionsImpl.signatureLength);
- assert(b.length == AnalysisOptionsImpl.signatureLength);
if (a.length != b.length) {
return false;
}
@@ -216,9 +212,6 @@
/// A set of analysis options used to control the behavior of an analysis
/// context.
class AnalysisOptionsImpl implements AnalysisOptions {
- /// The length of the list returned by `signature` getters.
- static const int signatureLength = 4;
-
/// The cached [unlinkedSignature].
Uint32List? _unlinkedSignature;
@@ -419,8 +412,7 @@
}
// Hash and convert to Uint32List.
- List<int> bytes = buffer.toByteList();
- _signature = Uint8List.fromList(bytes).buffer.asUint32List();
+ _signature = buffer.toUint32List();
}
return _signature!;
}
@@ -436,8 +428,7 @@
}
// Hash and convert to Uint32List.
- List<int> bytes = buffer.toByteList();
- _signatureForElements = Uint8List.fromList(bytes).buffer.asUint32List();
+ _signatureForElements = buffer.toUint32List();
}
return _signatureForElements!;
}
@@ -463,8 +454,7 @@
}
// Hash and convert to Uint32List.
- List<int> bytes = buffer.toByteList();
- _unlinkedSignature = Uint8List.fromList(bytes).buffer.asUint32List();
+ return buffer.toUint32List();
}
return _unlinkedSignature!;
}
diff --git a/pkg/analyzer/lib/src/summary/api_signature.dart b/pkg/analyzer/lib/src/summary/api_signature.dart
index 4a6d404..3b60046 100644
--- a/pkg/analyzer/lib/src/summary/api_signature.dart
+++ b/pkg/analyzer/lib/src/summary/api_signature.dart
@@ -122,6 +122,12 @@
return hex.encode(toByteList());
}
+ /// Return the MD5 hash of the data collected so far as [Uint32List].
+ Uint32List toUint32List() {
+ var bytes = toByteList();
+ return Uint8List.fromList(bytes).buffer.asUint32List();
+ }
+
/// Ensure that [spaceNeeded] bytes can be added to [_data] at [_offset]
/// (copying it to a larger object if necessary).
void _makeRoom(int spaceNeeded) {
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
index 5fab869..5088179 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_reader.dart
@@ -190,12 +190,12 @@
return AstTestFactory.emptyFunctionBody();
} else {
return astFactory.blockFunctionBody(
- AstBinaryFlags.isAsync(flags) ? Tokens.ASYNC : null,
- AstBinaryFlags.isGenerator(flags) ? Tokens.STAR : null,
+ AstBinaryFlags.isAsync(flags) ? Tokens.async_() : null,
+ AstBinaryFlags.isGenerator(flags) ? Tokens.star() : null,
astFactory.block(
- Tokens.OPEN_CURLY_BRACKET,
+ Tokens.openCurlyBracket(),
const <Statement>[],
- Tokens.CLOSE_CURLY_BRACKET,
+ Tokens.closeCurlyBracket(),
),
);
}
@@ -212,10 +212,10 @@
var constructorName = _readOptionalNode() as SimpleIdentifier?;
var arguments = _readOptionalNode() as ArgumentList?;
var node = astFactory.annotation(
- atSign: Tokens.AT,
+ atSign: Tokens.at(),
name: name,
typeArguments: typeArguments,
- period: Tokens.PERIOD,
+ period: Tokens.period(),
constructorName: constructorName,
arguments: arguments,
);
@@ -227,16 +227,16 @@
var arguments = _readNodeList<Expression>();
return astFactory.argumentList(
- Tokens.OPEN_PAREN,
+ Tokens.openParenthesis(),
arguments,
- Tokens.CLOSE_PAREN,
+ Tokens.closeParenthesis(),
);
}
AsExpression _readAsExpression() {
var expression = readNode() as Expression;
var type = readNode() as TypeAnnotation;
- var node = astFactory.asExpression(expression, Tokens.AS, type);
+ var node = astFactory.asExpression(expression, Tokens.as_(), type);
_readExpressionResolution(node);
return node;
}
@@ -245,12 +245,12 @@
var condition = readNode() as Expression;
var message = _readOptionalNode() as Expression?;
return astFactory.assertInitializer(
- Tokens.ASSERT,
- Tokens.OPEN_PAREN,
+ Tokens.assert_(),
+ Tokens.openParenthesis(),
condition,
- Tokens.COMMA,
+ Tokens.comma(),
message,
- Tokens.CLOSE_PAREN,
+ Tokens.closeParenthesis(),
);
}
@@ -274,7 +274,7 @@
AwaitExpression _readAwaitExpression() {
var expression = readNode() as Expression;
- return astFactory.awaitExpression(Tokens.AWAIT, expression);
+ return astFactory.awaitExpression(Tokens.await_(), expression);
}
BinaryExpression _readBinaryExpression() {
@@ -316,9 +316,9 @@
var elseExpression = readNode() as Expression;
var node = astFactory.conditionalExpression(
condition,
- Tokens.QUESTION,
+ Tokens.question(),
thenExpression,
- Tokens.COLON,
+ Tokens.colon(),
elseExpression,
);
_readExpressionResolution(node);
@@ -331,10 +331,10 @@
var expression = readNode() as Expression;
var hasThis = AstBinaryFlags.hasThis(flags);
return astFactory.constructorFieldInitializer(
- hasThis ? Tokens.THIS : null,
- hasThis ? Tokens.PERIOD : null,
+ hasThis ? Tokens.this_() : null,
+ hasThis ? Tokens.period() : null,
fieldName,
- Tokens.EQ,
+ Tokens.eq(),
expression,
);
}
@@ -345,7 +345,7 @@
var node = astFactory.constructorName(
type,
- name != null ? Tokens.PERIOD : null,
+ name != null ? Tokens.period() : null,
name,
);
node.staticElement = _reader.readElement() as ConstructorElement?;
@@ -370,11 +370,11 @@
metadata,
Tokens.choose(
AstBinaryFlags.isConst(flags),
- Tokens.CONST,
+ Tokens.const_(),
AstBinaryFlags.isFinal(flags),
- Tokens.FINAL,
+ Tokens.final_(),
AstBinaryFlags.isVar(flags),
- Tokens.VAR,
+ Tokens.var_(),
),
type,
identifier,
@@ -400,7 +400,7 @@
var node = astFactory.defaultFormalParameter(
parameter,
kind,
- AstBinaryFlags.hasInitializer(flags) ? Tokens.COLON : null,
+ AstBinaryFlags.hasInitializer(flags) ? Tokens.colon() : null,
defaultValue,
);
@@ -456,26 +456,26 @@
var identifier = readNode() as SimpleIdentifier;
var node = astFactory.fieldFormalParameter2(
identifier: identifier,
- period: Tokens.PERIOD,
- thisKeyword: Tokens.THIS,
+ period: Tokens.period(),
+ thisKeyword: Tokens.this_(),
covariantKeyword:
- AstBinaryFlags.isCovariant(flags) ? Tokens.COVARIANT : null,
+ AstBinaryFlags.isCovariant(flags) ? Tokens.covariant_() : null,
typeParameters: typeParameters,
keyword: Tokens.choose(
AstBinaryFlags.isConst(flags),
- Tokens.CONST,
+ Tokens.const_(),
AstBinaryFlags.isFinal(flags),
- Tokens.FINAL,
+ Tokens.final_(),
AstBinaryFlags.isVar(flags),
- Tokens.VAR,
+ Tokens.var_(),
),
metadata: metadata,
comment: null,
type: type,
parameters: formalParameters,
- question: AstBinaryFlags.hasQuestion(flags) ? Tokens.QUESTION : null,
+ question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
requiredKeyword:
- AstBinaryFlags.isRequired(flags) ? Tokens.REQUIRED : null,
+ AstBinaryFlags.isRequired(flags) ? Tokens.required_() : null,
);
return node;
}
@@ -484,7 +484,7 @@
var loopVariable = readNode() as DeclaredIdentifier;
var iterable = readNode() as Expression;
return astFactory.forEachPartsWithDeclaration(
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: iterable,
loopVariable: loopVariable,
);
@@ -495,12 +495,12 @@
var forLoopParts = readNode() as ForLoopParts;
var body = readNode() as CollectionElement;
return astFactory.forElement(
- awaitKeyword: AstBinaryFlags.hasAwait(flags) ? Tokens.AWAIT : null,
+ awaitKeyword: AstBinaryFlags.hasAwait(flags) ? Tokens.await_() : null,
body: body,
- forKeyword: Tokens.FOR,
+ forKeyword: Tokens.for_(),
forLoopParts: forLoopParts,
- leftParenthesis: Tokens.OPEN_PAREN,
- rightParenthesis: Tokens.CLOSE_PAREN,
+ leftParenthesis: Tokens.openParenthesis(),
+ rightParenthesis: Tokens.closeParenthesis(),
);
}
@@ -509,21 +509,21 @@
var parameters = _readNodeList<FormalParameter>();
return astFactory.formalParameterList(
- Tokens.OPEN_PAREN,
+ Tokens.openParenthesis(),
parameters,
Tokens.choose(
AstBinaryFlags.isDelimiterCurly(flags),
- Tokens.OPEN_CURLY_BRACKET,
+ Tokens.openCurlyBracket(),
AstBinaryFlags.isDelimiterSquare(flags),
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
),
Tokens.choose(
AstBinaryFlags.isDelimiterCurly(flags),
- Tokens.CLOSE_CURLY_BRACKET,
+ Tokens.closeCurlyBracket(),
AstBinaryFlags.isDelimiterSquare(flags),
- Tokens.CLOSE_SQUARE_BRACKET,
+ Tokens.closeSquareBracket(),
),
- Tokens.CLOSE_PAREN,
+ Tokens.closeParenthesis(),
);
}
@@ -533,8 +533,8 @@
var updaters = _readNodeList<Expression>();
return astFactory.forPartsWithDeclarations(
condition: condition,
- leftSeparator: Tokens.SEMICOLON,
- rightSeparator: Tokens.SEMICOLON,
+ leftSeparator: Tokens.semicolon(),
+ rightSeparator: Tokens.semicolon(),
updaters: updaters,
variables: variables,
);
@@ -547,8 +547,8 @@
return astFactory.forPartsWithExpression(
condition: condition,
initialization: initialization,
- leftSeparator: Tokens.SEMICOLON,
- rightSeparator: Tokens.SEMICOLON,
+ leftSeparator: Tokens.semicolon(),
+ rightSeparator: Tokens.semicolon(),
updaters: updaters,
);
}
@@ -589,12 +589,12 @@
var node = astFactory.functionTypedFormalParameter2(
comment: null,
covariantKeyword:
- AstBinaryFlags.isCovariant(flags) ? Tokens.COVARIANT : null,
+ AstBinaryFlags.isCovariant(flags) ? Tokens.covariant_() : null,
identifier: identifier,
metadata: metadata,
parameters: formalParameters,
requiredKeyword:
- AstBinaryFlags.isRequired(flags) ? Tokens.REQUIRED : null,
+ AstBinaryFlags.isRequired(flags) ? Tokens.required_() : null,
returnType: returnType,
typeParameters: typeParameters,
);
@@ -609,10 +609,10 @@
var formalParameters = readNode() as FormalParameterList;
var node = astFactory.genericFunctionType(
returnType,
- Tokens.FUNCTION,
+ Tokens.function(),
typeParameters,
formalParameters,
- question: AstBinaryFlags.hasQuestion(flags) ? Tokens.QUESTION : null,
+ question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
);
var type = _reader.readRequiredType() as FunctionType;
node.type = type;
@@ -635,10 +635,10 @@
return astFactory.ifElement(
condition: condition,
elseElement: elseElement,
- elseKeyword: elseElement != null ? Tokens.ELSE : null,
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
- rightParenthesis: Tokens.CLOSE_PAREN,
+ elseKeyword: elseElement != null ? Tokens.else_() : null,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: thenElement,
);
}
@@ -652,20 +652,20 @@
if (target != null) {
node = (astFactory.indexExpressionForTarget2(
target: target,
- question: AstBinaryFlags.hasQuestion(flags) ? Tokens.QUESTION : null,
- leftBracket: Tokens.OPEN_SQUARE_BRACKET,
+ question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
+ leftBracket: Tokens.openSquareBracket(),
index: index,
- rightBracket: Tokens.CLOSE_SQUARE_BRACKET,
+ rightBracket: Tokens.closeSquareBracket(),
))
..period =
- AstBinaryFlags.hasPeriod(flags) ? Tokens.PERIOD_PERIOD : null;
+ AstBinaryFlags.hasPeriod(flags) ? Tokens.periodPeriod() : null;
} else {
node = astFactory.indexExpressionForCascade2(
- period: Tokens.PERIOD_PERIOD,
- question: AstBinaryFlags.hasQuestion(flags) ? Tokens.QUESTION : null,
- leftBracket: Tokens.OPEN_SQUARE_BRACKET,
+ period: Tokens.periodPeriod(),
+ question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
+ leftBracket: Tokens.openSquareBracket(),
index: index,
- rightBracket: Tokens.CLOSE_SQUARE_BRACKET,
+ rightBracket: Tokens.closeSquareBracket(),
);
}
node.staticElement = _reader.readElement() as MethodElement?;
@@ -681,9 +681,9 @@
var node = astFactory.instanceCreationExpression(
Tokens.choose(
AstBinaryFlags.isConst(flags),
- Tokens.CONST,
+ Tokens.const_(),
AstBinaryFlags.isNew(flags),
- Tokens.NEW,
+ Tokens.new_(),
),
constructorName,
argumentList,
@@ -732,10 +732,10 @@
var isIdentifier = AstBinaryFlags.isStringInterpolationIdentifier(flags);
return astFactory.interpolationExpression(
isIdentifier
- ? Tokens.OPEN_CURLY_BRACKET
- : Tokens.STRING_INTERPOLATION_EXPRESSION,
+ ? Tokens.openCurlyBracket()
+ : Tokens.stringInterpolationExpression(),
expression,
- isIdentifier ? null : Tokens.CLOSE_CURLY_BRACKET,
+ isIdentifier ? null : Tokens.closeCurlyBracket(),
);
}
@@ -759,8 +759,8 @@
var type = readNode() as TypeAnnotation;
var node = astFactory.isExpression(
expression,
- Tokens.IS,
- AstBinaryFlags.hasNot(flags) ? Tokens.BANG : null,
+ Tokens.is_(),
+ AstBinaryFlags.hasNot(flags) ? Tokens.bang() : null,
type,
);
_readExpressionResolution(node);
@@ -773,11 +773,11 @@
var elements = _readNodeList<CollectionElement>();
var node = astFactory.listLiteral(
- AstBinaryFlags.isConst(flags) ? Tokens.CONST : null,
+ AstBinaryFlags.isConst(flags) ? Tokens.const_() : null,
typeArguments,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
elements,
- Tokens.CLOSE_SQUARE_BRACKET,
+ Tokens.closeSquareBracket(),
);
_readExpressionResolution(node);
return node;
@@ -786,7 +786,7 @@
MapLiteralEntry _readMapLiteralEntry() {
var key = readNode() as Expression;
var value = readNode() as Expression;
- return astFactory.mapLiteralEntry(key, Tokens.COLON, value);
+ return astFactory.mapLiteralEntry(key, Tokens.colon(), value);
}
MethodInvocation _readMethodInvocation() {
@@ -800,9 +800,9 @@
target,
Tokens.choose(
AstBinaryFlags.hasPeriod(flags),
- Tokens.PERIOD,
+ Tokens.period(),
AstBinaryFlags.hasPeriod2(flags),
- Tokens.PERIOD_PERIOD,
+ Tokens.periodPeriod(),
),
methodName,
typeArguments,
@@ -822,14 +822,14 @@
var node = astFactory.mixinDeclaration(
null,
metadata,
- Tokens.MIXIN,
+ Tokens.mixin_(),
name,
typeParameters,
onClause,
implementsClause,
- Tokens.OPEN_CURLY_BRACKET,
+ Tokens.openCurlyBracket(),
const <ClassMember>[],
- Tokens.CLOSE_CURLY_BRACKET,
+ Tokens.closeCurlyBracket(),
);
return node;
@@ -841,7 +841,7 @@
astFactory.simpleIdentifier(
StringToken(TokenType.STRING, name, -1),
),
- Tokens.COLON,
+ Tokens.colon(),
);
var expression = readNode() as Expression;
var node = astFactory.namedExpression(nameNode, expression);
@@ -856,7 +856,7 @@
NullLiteral _readNullLiteral() {
return astFactory.nullLiteral(
- Tokens.NULL,
+ Tokens.null_(),
);
}
@@ -882,9 +882,9 @@
ParenthesizedExpression _readParenthesizedExpression() {
var expression = readNode() as Expression;
var node = astFactory.parenthesizedExpression(
- Tokens.OPEN_PAREN,
+ Tokens.openParenthesis(),
expression,
- Tokens.CLOSE_PAREN,
+ Tokens.closeParenthesis(),
);
_readExpressionResolution(node);
return node;
@@ -913,7 +913,7 @@
var identifier = readNode() as SimpleIdentifier;
var node = astFactory.prefixedIdentifier(
prefix,
- Tokens.PERIOD,
+ Tokens.period(),
identifier,
);
_readExpressionResolution(node);
@@ -946,12 +946,12 @@
Token operator;
if (AstBinaryFlags.hasQuestion(flags)) {
operator = AstBinaryFlags.hasPeriod(flags)
- ? Tokens.QUESTION_PERIOD
- : Tokens.QUESTION_PERIOD_PERIOD;
+ ? Tokens.questionPeriod()
+ : Tokens.questionPeriodPeriod();
} else {
operator = AstBinaryFlags.hasPeriod(flags)
- ? Tokens.PERIOD
- : Tokens.PERIOD_PERIOD;
+ ? Tokens.period()
+ : Tokens.periodPeriod();
}
var node = astFactory.propertyAccess(target, operator, propertyName);
@@ -963,8 +963,8 @@
var constructorName = _readOptionalNode() as SimpleIdentifier?;
var argumentList = readNode() as ArgumentList;
var node = astFactory.redirectingConstructorInvocation(
- Tokens.THIS,
- constructorName != null ? Tokens.PERIOD : null,
+ Tokens.this_(),
+ constructorName != null ? Tokens.period() : null,
constructorName,
argumentList,
);
@@ -979,11 +979,11 @@
var typeArguments = _readOptionalNode() as TypeArgumentList?;
var elements = _readNodeList<CollectionElement>();
var node = astFactory.setOrMapLiteral(
- constKeyword: AstBinaryFlags.isConst(flags) ? Tokens.CONST : null,
+ constKeyword: AstBinaryFlags.isConst(flags) ? Tokens.const_() : null,
elements: elements,
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
typeArguments: typeArguments,
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
);
const isMapBit = 1 << 0;
@@ -1009,19 +1009,19 @@
identifier: identifier,
type: type,
covariantKeyword:
- AstBinaryFlags.isCovariant(flags) ? Tokens.COVARIANT : null,
+ AstBinaryFlags.isCovariant(flags) ? Tokens.covariant_() : null,
comment: null,
metadata: metadata,
keyword: Tokens.choose(
AstBinaryFlags.isConst(flags),
- Tokens.CONST,
+ Tokens.const_(),
AstBinaryFlags.isFinal(flags),
- Tokens.FINAL,
+ Tokens.final_(),
AstBinaryFlags.isVar(flags),
- Tokens.VAR,
+ Tokens.var_(),
),
requiredKeyword:
- AstBinaryFlags.isRequired(flags) ? Tokens.REQUIRED : null,
+ AstBinaryFlags.isRequired(flags) ? Tokens.required_() : null,
);
var actualType = _reader.readRequiredType();
_reader.readByte(); // TODO(scheglov) inherits covariant
@@ -1059,8 +1059,8 @@
var expression = readNode() as Expression;
return astFactory.spreadElement(
spreadOperator: AstBinaryFlags.hasQuestion(flags)
- ? Tokens.PERIOD_PERIOD_PERIOD_QUESTION
- : Tokens.PERIOD_PERIOD_PERIOD,
+ ? Tokens.periodPeriodPeriodQuestion()
+ : Tokens.periodPeriodPeriod(),
expression: expression,
);
}
@@ -1078,8 +1078,8 @@
var constructorName = _readOptionalNode() as SimpleIdentifier?;
var argumentList = readNode() as ArgumentList;
var node = astFactory.superConstructorInvocation(
- Tokens.SUPER,
- Tokens.PERIOD,
+ Tokens.super_(),
+ Tokens.period(),
constructorName,
argumentList,
);
@@ -1089,7 +1089,7 @@
}
SuperExpression _readSuperExpression() {
- var node = astFactory.superExpression(Tokens.SUPER);
+ var node = astFactory.superExpression(Tokens.super_());
_readExpressionResolution(node);
return node;
}
@@ -1099,27 +1099,27 @@
.readStringReferenceList()
.map(TokenFactory.tokenFromString)
.toList();
- var node = astFactory.symbolLiteral(Tokens.HASH, components);
+ var node = astFactory.symbolLiteral(Tokens.hash(), components);
_readExpressionResolution(node);
return node;
}
ThisExpression _readThisExpression() {
- var node = astFactory.thisExpression(Tokens.THIS);
+ var node = astFactory.thisExpression(Tokens.this_());
_readExpressionResolution(node);
return node;
}
ThrowExpression _readThrowExpression() {
var expression = readNode() as Expression;
- var node = astFactory.throwExpression(Tokens.THROW, expression);
+ var node = astFactory.throwExpression(Tokens.throw_(), expression);
_readExpressionResolution(node);
return node;
}
TypeArgumentList _readTypeArgumentList() {
var arguments = _readNodeList<TypeAnnotation>();
- return astFactory.typeArgumentList(Tokens.LT, arguments, Tokens.GT);
+ return astFactory.typeArgumentList(Tokens.lt(), arguments, Tokens.gt());
}
TypeName _readTypeName() {
@@ -1130,7 +1130,7 @@
var node = astFactory.typeName(
name,
typeArguments,
- question: AstBinaryFlags.hasQuestion(flags) ? Tokens.QUESTION : null,
+ question: AstBinaryFlags.hasQuestion(flags) ? Tokens.question() : null,
);
node.type = _reader.readType();
return node;
@@ -1145,7 +1145,7 @@
null,
metadata,
name,
- bound != null ? Tokens.EXTENDS : null,
+ bound != null ? Tokens.extends_() : null,
bound,
);
@@ -1155,9 +1155,9 @@
TypeParameterList _readTypeParameterList() {
var typeParameters = _readNodeList<TypeParameter>();
return astFactory.typeParameterList(
- Tokens.LT,
+ Tokens.lt(),
typeParameters,
- Tokens.GT,
+ Tokens.gt(),
);
}
@@ -1172,7 +1172,7 @@
var node = astFactory.variableDeclaration(
name,
- Tokens.EQ,
+ Tokens.eq(),
initializer,
);
@@ -1191,13 +1191,13 @@
comment: null,
keyword: Tokens.choose(
AstBinaryFlags.isConst(flags),
- Tokens.CONST,
+ Tokens.const_(),
AstBinaryFlags.isFinal(flags),
- Tokens.FINAL,
+ Tokens.final_(),
AstBinaryFlags.isVar(flags),
- Tokens.VAR,
+ Tokens.var_(),
),
- lateKeyword: AstBinaryFlags.isLate(flags) ? Tokens.LATE : null,
+ lateKeyword: AstBinaryFlags.isLate(flags) ? Tokens.late_() : null,
metadata: metadata,
type: type,
variables: variables,
diff --git a/pkg/analyzer/lib/src/summary2/ast_binary_tokens.dart b/pkg/analyzer/lib/src/summary2/ast_binary_tokens.dart
index 8ac8435..b19041d 100644
--- a/pkg/analyzer/lib/src/summary2/ast_binary_tokens.dart
+++ b/pkg/analyzer/lib/src/summary2/ast_binary_tokens.dart
@@ -8,101 +8,23 @@
import 'package:analyzer/src/summary2/unlinked_token_type.dart';
class Tokens {
- static final ABSTRACT = TokenFactory.tokenFromKeyword(Keyword.ABSTRACT);
- static final ARROW = TokenFactory.tokenFromType(TokenType.FUNCTION);
- static final AS = TokenFactory.tokenFromKeyword(Keyword.AS);
- static final ASSERT = TokenFactory.tokenFromKeyword(Keyword.ASSERT);
- static final AT = TokenFactory.tokenFromType(TokenType.AT);
- static final ASYNC = TokenFactory.tokenFromKeyword(Keyword.ASYNC);
- static final AWAIT = TokenFactory.tokenFromKeyword(Keyword.AWAIT);
- static final BANG = TokenFactory.tokenFromType(TokenType.BANG);
- static final BREAK = TokenFactory.tokenFromKeyword(Keyword.BREAK);
- static final CASE = TokenFactory.tokenFromKeyword(Keyword.CASE);
- static final CATCH = TokenFactory.tokenFromKeyword(Keyword.CATCH);
- static final CLASS = TokenFactory.tokenFromKeyword(Keyword.CLASS);
- static final CLOSE_CURLY_BRACKET =
- TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET);
- static final CLOSE_PAREN = TokenFactory.tokenFromType(TokenType.CLOSE_PAREN);
- static final CLOSE_SQUARE_BRACKET =
- TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET);
- static final COLON = TokenFactory.tokenFromType(TokenType.COLON);
- static final COMMA = TokenFactory.tokenFromType(TokenType.COMMA);
- static final CONST = TokenFactory.tokenFromKeyword(Keyword.CONST);
- static final CONTINUE = TokenFactory.tokenFromKeyword(Keyword.CONTINUE);
- static final COVARIANT = TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
- static final DEFERRED = TokenFactory.tokenFromKeyword(Keyword.DEFERRED);
- static final ELSE = TokenFactory.tokenFromKeyword(Keyword.ELSE);
- static final EXTERNAL = TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
- static final FACTORY = TokenFactory.tokenFromKeyword(Keyword.FACTORY);
- static final DEFAULT = TokenFactory.tokenFromKeyword(Keyword.DEFAULT);
- static final DO = TokenFactory.tokenFromKeyword(Keyword.DO);
- static final ENUM = TokenFactory.tokenFromKeyword(Keyword.ENUM);
- static final EQ = TokenFactory.tokenFromType(TokenType.EQ);
- static final EXPORT = TokenFactory.tokenFromKeyword(Keyword.EXPORT);
- static final EXTENDS = TokenFactory.tokenFromKeyword(Keyword.EXTENDS);
- static final EXTENSION = TokenFactory.tokenFromKeyword(Keyword.EXTENSION);
- static final FINAL = TokenFactory.tokenFromKeyword(Keyword.FINAL);
- static final FINALLY = TokenFactory.tokenFromKeyword(Keyword.FINALLY);
- static final FOR = TokenFactory.tokenFromKeyword(Keyword.FOR);
- static final FUNCTION = TokenFactory.tokenFromKeyword(Keyword.FUNCTION);
- static final GET = TokenFactory.tokenFromKeyword(Keyword.GET);
- static final GT = TokenFactory.tokenFromType(TokenType.GT);
- static final HASH = TokenFactory.tokenFromType(TokenType.HASH);
- static final HIDE = TokenFactory.tokenFromKeyword(Keyword.HIDE);
- static final IF = TokenFactory.tokenFromKeyword(Keyword.IF);
- static final IMPLEMENTS = TokenFactory.tokenFromKeyword(Keyword.IMPORT);
- static final IMPORT = TokenFactory.tokenFromKeyword(Keyword.IMPLEMENTS);
- static final IN = TokenFactory.tokenFromKeyword(Keyword.IN);
- static final IS = TokenFactory.tokenFromKeyword(Keyword.IS);
- static final LATE = TokenFactory.tokenFromKeyword(Keyword.LATE);
- static final LIBRARY = TokenFactory.tokenFromKeyword(Keyword.LIBRARY);
- static final LT = TokenFactory.tokenFromType(TokenType.LT);
- static final MIXIN = TokenFactory.tokenFromKeyword(Keyword.MIXIN);
- static final NATIVE = TokenFactory.tokenFromKeyword(Keyword.NATIVE);
- static final NEW = TokenFactory.tokenFromKeyword(Keyword.NEW);
- static final NULL = TokenFactory.tokenFromKeyword(Keyword.NULL);
- static final OF = TokenFactory.tokenFromKeyword(Keyword.OF);
- static final ON = TokenFactory.tokenFromKeyword(Keyword.ON);
- static final OPEN_CURLY_BRACKET =
- TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET);
- static final OPEN_PAREN = TokenFactory.tokenFromType(TokenType.OPEN_PAREN);
- static final OPEN_SQUARE_BRACKET =
- TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET);
- static final OPERATOR = TokenFactory.tokenFromKeyword(Keyword.OPERATOR);
- static final PART = TokenFactory.tokenFromKeyword(Keyword.PART);
- static final PERIOD = TokenFactory.tokenFromType(TokenType.PERIOD);
- static final PERIOD_PERIOD =
- TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD);
- static final PERIOD_PERIOD_PERIOD =
- TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD);
- static final PERIOD_PERIOD_PERIOD_QUESTION =
- TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD_QUESTION);
- static final QUESTION = TokenFactory.tokenFromType(TokenType.QUESTION);
- static final QUESTION_PERIOD =
- TokenFactory.tokenFromType(TokenType.QUESTION_PERIOD);
- static final QUESTION_PERIOD_PERIOD =
- TokenFactory.tokenFromType(TokenType.QUESTION_PERIOD_PERIOD);
- static final REQUIRED = TokenFactory.tokenFromKeyword(Keyword.REQUIRED);
- static final RETHROW = TokenFactory.tokenFromKeyword(Keyword.RETHROW);
- static final RETURN = TokenFactory.tokenFromKeyword(Keyword.RETURN);
- static final SEMICOLON = TokenFactory.tokenFromType(TokenType.SEMICOLON);
- static final SET = TokenFactory.tokenFromKeyword(Keyword.SET);
- static final SHOW = TokenFactory.tokenFromKeyword(Keyword.SHOW);
- static final STAR = TokenFactory.tokenFromType(TokenType.STAR);
- static final STATIC = TokenFactory.tokenFromKeyword(Keyword.STATIC);
- static final STRING_INTERPOLATION_EXPRESSION =
- TokenFactory.tokenFromType(TokenType.STRING_INTERPOLATION_EXPRESSION);
- static final SUPER = TokenFactory.tokenFromKeyword(Keyword.SUPER);
- static final SWITCH = TokenFactory.tokenFromKeyword(Keyword.SWITCH);
- static final SYNC = TokenFactory.tokenFromKeyword(Keyword.SYNC);
- static final THIS = TokenFactory.tokenFromKeyword(Keyword.THIS);
- static final THROW = TokenFactory.tokenFromKeyword(Keyword.THROW);
- static final TRY = TokenFactory.tokenFromKeyword(Keyword.TRY);
- static final TYPEDEF = TokenFactory.tokenFromKeyword(Keyword.TYPEDEF);
- static final VAR = TokenFactory.tokenFromKeyword(Keyword.VAR);
- static final WITH = TokenFactory.tokenFromKeyword(Keyword.WITH);
- static final WHILE = TokenFactory.tokenFromKeyword(Keyword.WHILE);
- static final YIELD = TokenFactory.tokenFromKeyword(Keyword.YIELD);
+ static Token as_() => TokenFactory.tokenFromKeyword(Keyword.AS);
+
+ static Token assert_() => TokenFactory.tokenFromKeyword(Keyword.ASSERT);
+
+ static Token async_() => TokenFactory.tokenFromKeyword(Keyword.ASYNC);
+
+ static Token at() => TokenFactory.tokenFromType(TokenType.AT);
+
+ static Token await_() => TokenFactory.tokenFromKeyword(Keyword.AWAIT);
+
+ static Token bang() => TokenFactory.tokenFromType(TokenType.BANG);
+
+ static Token break_() => TokenFactory.tokenFromKeyword(Keyword.BREAK);
+
+ static Token case_() => TokenFactory.tokenFromKeyword(Keyword.CASE);
+
+ static Token catch_() => TokenFactory.tokenFromKeyword(Keyword.CATCH);
static Token? choose(bool if1, Token then1, bool if2, Token then2,
[bool? if3, Token? then3]) {
@@ -112,9 +34,167 @@
return null;
}
+ static Token class_() => TokenFactory.tokenFromKeyword(Keyword.CLASS);
+
+ static Token closeCurlyBracket() =>
+ TokenFactory.tokenFromType(TokenType.CLOSE_CURLY_BRACKET);
+
+ static Token closeParenthesis() =>
+ TokenFactory.tokenFromType(TokenType.CLOSE_PAREN);
+
+ static Token closeSquareBracket() =>
+ TokenFactory.tokenFromType(TokenType.CLOSE_SQUARE_BRACKET);
+
+ static Token colon() => TokenFactory.tokenFromType(TokenType.COLON);
+
+ static Token comma() => TokenFactory.tokenFromType(TokenType.COMMA);
+
+ static Token const_() => TokenFactory.tokenFromKeyword(Keyword.CONST);
+
+ static Token continue_() => TokenFactory.tokenFromKeyword(Keyword.CONTINUE);
+
+ static Token covariant_() => TokenFactory.tokenFromKeyword(Keyword.COVARIANT);
+
+ static Token default_() => TokenFactory.tokenFromKeyword(Keyword.DEFAULT);
+
+ static Token do_() => TokenFactory.tokenFromKeyword(Keyword.DO);
+
+ static Token else_() => TokenFactory.tokenFromKeyword(Keyword.ELSE);
+
+ static Token enum_() => TokenFactory.tokenFromKeyword(Keyword.ENUM);
+
+ static Token eq() => TokenFactory.tokenFromType(TokenType.EQ);
+
+ static Token export_() => TokenFactory.tokenFromKeyword(Keyword.EXPORT);
+
+ static Token extends_() => TokenFactory.tokenFromKeyword(Keyword.EXTENDS);
+
+ static Token extension_() => TokenFactory.tokenFromKeyword(Keyword.EXTENSION);
+
+ static Token external_() => TokenFactory.tokenFromKeyword(Keyword.EXTERNAL);
+
+ static Token factory_() => TokenFactory.tokenFromKeyword(Keyword.FACTORY);
+
+ static Token final_() => TokenFactory.tokenFromKeyword(Keyword.FINAL);
+
+ static Token finally_() => TokenFactory.tokenFromKeyword(Keyword.FINALLY);
+
+ static Token for_() => TokenFactory.tokenFromKeyword(Keyword.FOR);
+
static Token fromType(UnlinkedTokenType type) {
return TokenFactory.tokenFromType(
TokensContext.binaryToAstTokenType(type),
);
}
+
+ static Token function() => TokenFactory.tokenFromKeyword(Keyword.FUNCTION);
+
+ static Token get_() => TokenFactory.tokenFromKeyword(Keyword.GET);
+
+ static Token gt() => TokenFactory.tokenFromType(TokenType.GT);
+
+ static Token hash() => TokenFactory.tokenFromType(TokenType.HASH);
+
+ static Token hide_() => TokenFactory.tokenFromKeyword(Keyword.HIDE);
+
+ static Token if_() => TokenFactory.tokenFromKeyword(Keyword.IF);
+
+ static Token implements_() => TokenFactory.tokenFromKeyword(Keyword.IMPORT);
+
+ static Token import_() => TokenFactory.tokenFromKeyword(Keyword.IMPLEMENTS);
+
+ static Token in_() => TokenFactory.tokenFromKeyword(Keyword.IN);
+
+ static Token is_() => TokenFactory.tokenFromKeyword(Keyword.IS);
+
+ static Token late_() => TokenFactory.tokenFromKeyword(Keyword.LATE);
+
+ static Token library_() => TokenFactory.tokenFromKeyword(Keyword.LIBRARY);
+
+ static Token lt() => TokenFactory.tokenFromType(TokenType.LT);
+
+ static Token mixin_() => TokenFactory.tokenFromKeyword(Keyword.MIXIN);
+
+ static Token native_() => TokenFactory.tokenFromKeyword(Keyword.NATIVE);
+
+ static Token new_() => TokenFactory.tokenFromKeyword(Keyword.NEW);
+
+ static Token null_() => TokenFactory.tokenFromKeyword(Keyword.NULL);
+
+ static Token of_() => TokenFactory.tokenFromKeyword(Keyword.OF);
+
+ static Token on_() => TokenFactory.tokenFromKeyword(Keyword.ON);
+
+ static Token openCurlyBracket() =>
+ TokenFactory.tokenFromType(TokenType.OPEN_CURLY_BRACKET);
+
+ static Token openParenthesis() =>
+ TokenFactory.tokenFromType(TokenType.OPEN_PAREN);
+
+ static Token openSquareBracket() =>
+ TokenFactory.tokenFromType(TokenType.OPEN_SQUARE_BRACKET);
+
+ static Token operator_() => TokenFactory.tokenFromKeyword(Keyword.OPERATOR);
+
+ static Token part_() => TokenFactory.tokenFromKeyword(Keyword.PART);
+
+ static Token period() => TokenFactory.tokenFromType(TokenType.PERIOD);
+
+ static Token periodPeriod() =>
+ TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD);
+
+ static Token periodPeriodPeriod() =>
+ TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD);
+
+ static Token periodPeriodPeriodQuestion() =>
+ TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD_QUESTION);
+
+ static Token question() => TokenFactory.tokenFromType(TokenType.QUESTION);
+
+ static Token questionPeriod() =>
+ TokenFactory.tokenFromType(TokenType.QUESTION_PERIOD);
+
+ static Token questionPeriodPeriod() =>
+ TokenFactory.tokenFromType(TokenType.QUESTION_PERIOD_PERIOD);
+
+ static Token required_() => TokenFactory.tokenFromKeyword(Keyword.REQUIRED);
+
+ static Token rethrow_() => TokenFactory.tokenFromKeyword(Keyword.RETHROW);
+
+ static Token return_() => TokenFactory.tokenFromKeyword(Keyword.RETURN);
+
+ static Token semicolon() => TokenFactory.tokenFromType(TokenType.SEMICOLON);
+
+ static Token set_() => TokenFactory.tokenFromKeyword(Keyword.SET);
+
+ static Token show_() => TokenFactory.tokenFromKeyword(Keyword.SHOW);
+
+ static Token star() => TokenFactory.tokenFromType(TokenType.STAR);
+
+ static Token static_() => TokenFactory.tokenFromKeyword(Keyword.STATIC);
+
+ static Token stringInterpolationExpression() =>
+ TokenFactory.tokenFromType(TokenType.STRING_INTERPOLATION_EXPRESSION);
+
+ static Token super_() => TokenFactory.tokenFromKeyword(Keyword.SUPER);
+
+ static Token switch_() => TokenFactory.tokenFromKeyword(Keyword.SWITCH);
+
+ static Token sync_() => TokenFactory.tokenFromKeyword(Keyword.SYNC);
+
+ static Token this_() => TokenFactory.tokenFromKeyword(Keyword.THIS);
+
+ static Token throw_() => TokenFactory.tokenFromKeyword(Keyword.THROW);
+
+ static Token try_() => TokenFactory.tokenFromKeyword(Keyword.TRY);
+
+ static Token typedef_() => TokenFactory.tokenFromKeyword(Keyword.TYPEDEF);
+
+ static Token var_() => TokenFactory.tokenFromKeyword(Keyword.VAR);
+
+ static Token while_() => TokenFactory.tokenFromKeyword(Keyword.WHILE);
+
+ static Token with_() => TokenFactory.tokenFromKeyword(Keyword.WITH);
+
+ static Token yield_() => TokenFactory.tokenFromKeyword(Keyword.YIELD);
}
diff --git a/pkg/analyzer/test/generated/parser_test_base.dart b/pkg/analyzer/test/generated/parser_test_base.dart
index 7498a95..956e4ae 100644
--- a/pkg/analyzer/test/generated/parser_test_base.dart
+++ b/pkg/analyzer/test/generated/parser_test_base.dart
@@ -818,9 +818,9 @@
null,
null,
null,
- Tokens.OPEN_CURLY_BRACKET /* leftBracket */,
+ Tokens.openCurlyBracket() /* leftBracket */,
<ClassMember>[],
- Tokens.CLOSE_CURLY_BRACKET /* rightBracket */,
+ Tokens.closeCurlyBracket() /* rightBracket */,
);
// TODO(danrubel): disambiguate between class and mixin
currentToken = fastaParser.parseClassMember(currentToken, className);
diff --git a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
index aaf0550..9bff2bc 100644
--- a/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
+++ b/pkg/analyzer/test/src/dart/ast/to_source_visitor_test.dart
@@ -1009,7 +1009,7 @@
'var e in l',
astFactory.forEachPartsWithDeclaration(
loopVariable: AstTestFactory.declaredIdentifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l')));
}
@@ -1018,7 +1018,7 @@
'e in l',
astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l')));
}
@@ -1065,13 +1065,13 @@
_assertSource(
'for (e in l) 0',
astFactory.forElement(
- forKeyword: Tokens.FOR,
- leftParenthesis: Tokens.OPEN_PAREN,
+ forKeyword: Tokens.for_(),
+ leftParenthesis: Tokens.openParenthesis(),
forLoopParts: astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l')),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
body: AstTestFactory.integer(0)),
);
}
@@ -1270,9 +1270,9 @@
astFactory.forPartsWithDeclarations(
variables: AstTestFactory.variableDeclarationList2(
Keyword.VAR, [AstTestFactory.variableDeclaration('v')]),
- leftSeparator: Tokens.SEMICOLON,
+ leftSeparator: Tokens.semicolon(),
condition: AstTestFactory.identifier3('b'),
- rightSeparator: Tokens.SEMICOLON,
+ rightSeparator: Tokens.semicolon(),
updaters: [AstTestFactory.identifier3('u')]));
}
@@ -1281,9 +1281,9 @@
'v; b; u',
astFactory.forPartsWithExpression(
initialization: AstTestFactory.identifier3('v'),
- leftSeparator: Tokens.SEMICOLON,
+ leftSeparator: Tokens.semicolon(),
condition: AstTestFactory.identifier3('b'),
- rightSeparator: Tokens.SEMICOLON,
+ rightSeparator: Tokens.semicolon(),
updaters: [AstTestFactory.identifier3('u')]));
}
@@ -1291,13 +1291,13 @@
_assertSource(
'for (e in l) s;',
astFactory.forStatement(
- forKeyword: Tokens.FOR,
- leftParenthesis: Tokens.OPEN_PAREN,
+ forKeyword: Tokens.for_(),
+ leftParenthesis: Tokens.openParenthesis(),
forLoopParts: astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l')),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
body: AstTestFactory.expressionStatement(
AstTestFactory.identifier3('s'))),
);
@@ -1673,12 +1673,12 @@
_assertSource(
'if (b) 1 else 0',
astFactory.ifElement(
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
condition: AstTestFactory.identifier3('b'),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: AstTestFactory.integer(1),
- elseKeyword: Tokens.ELSE,
+ elseKeyword: Tokens.else_(),
elseElement: AstTestFactory.integer(0)));
}
@@ -1686,10 +1686,10 @@
_assertSource(
'if (b) 1',
astFactory.ifElement(
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
condition: AstTestFactory.identifier3('b'),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: AstTestFactory.integer(1)));
}
@@ -1918,23 +1918,23 @@
astFactory.listLiteral(
null,
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[
AstTestFactory.integer(0),
astFactory.forElement(
- forKeyword: Tokens.FOR,
- leftParenthesis: Tokens.OPEN_PAREN,
+ forKeyword: Tokens.for_(),
+ leftParenthesis: Tokens.openParenthesis(),
forLoopParts: astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l')),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
body: AstTestFactory.integer(0)),
astFactory.ifElement(
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
condition: AstTestFactory.identifier3('b'),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: AstTestFactory.integer(1)),
astFactory.spreadElement(
spreadOperator: TokenFactory.tokenFromType(
@@ -1942,11 +1942,11 @@
expression: astFactory.listLiteral(
null,
null,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET))
+ Tokens.closeSquareBracket()))
],
- Tokens.CLOSE_SQUARE_BRACKET));
+ Tokens.closeSquareBracket()));
}
void test_visitListLiteral_const() {
@@ -1973,9 +1973,9 @@
astFactory.listLiteral(
TokenFactory.tokenFromKeyword(Keyword.CONST),
null,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET));
+ Tokens.closeSquareBracket()));
}
void test_visitListLiteral_withConst_withTypeArgs() {
@@ -1984,16 +1984,16 @@
astFactory.listLiteral(
TokenFactory.tokenFromKeyword(Keyword.CONST),
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET));
+ Tokens.closeSquareBracket()));
}
void test_visitListLiteral_withoutConst_withoutTypeArgs() {
_assertSource(
'[0]',
- astFactory.listLiteral(null, null, Tokens.OPEN_SQUARE_BRACKET,
- [AstTestFactory.integer(0)], Tokens.CLOSE_SQUARE_BRACKET));
+ astFactory.listLiteral(null, null, Tokens.openSquareBracket(),
+ [AstTestFactory.integer(0)], Tokens.closeSquareBracket()));
}
void test_visitListLiteral_withoutConst_withTypeArgs() {
@@ -2002,9 +2002,9 @@
astFactory.listLiteral(
null,
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET));
+ Tokens.closeSquareBracket()));
}
void test_visitMapLiteral_const() {
@@ -2395,7 +2395,7 @@
_assertSource(
"<String, String>{'a' : 'b', for (c in d) 'e' : 'f', if (g) 'h' : 'i', ...{'j' : 'k'}}",
astFactory.setOrMapLiteral(
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
typeArguments: AstTestFactory.typeArgumentList([
AstTestFactory.typeName4('String'),
AstTestFactory.typeName4('String')
@@ -2403,33 +2403,33 @@
elements: [
AstTestFactory.mapLiteralEntry3('a', 'b'),
astFactory.forElement(
- forKeyword: Tokens.FOR,
- leftParenthesis: Tokens.OPEN_PAREN,
+ forKeyword: Tokens.for_(),
+ leftParenthesis: Tokens.openParenthesis(),
forLoopParts: astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('c'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('d'),
),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
body: AstTestFactory.mapLiteralEntry3('e', 'f')),
astFactory.ifElement(
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
condition: AstTestFactory.identifier3('g'),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: AstTestFactory.mapLiteralEntry3('h', 'i'),
),
astFactory.spreadElement(
spreadOperator:
TokenFactory.tokenFromType(TokenType.PERIOD_PERIOD_PERIOD),
expression: astFactory.setOrMapLiteral(
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.mapLiteralEntry3('j', 'k')],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
)
],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2438,10 +2438,10 @@
_assertSource(
"const {'a' : 'b'}",
astFactory.setOrMapLiteral(
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
elements: [AstTestFactory.mapLiteralEntry3('a', 'b')],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2455,9 +2455,9 @@
AstTestFactory.typeName4('String'),
AstTestFactory.typeName4('String')
]),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.mapLiteralEntry3('a', 'b')],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2466,9 +2466,9 @@
_assertSource(
"{'a' : 'b'}",
astFactory.setOrMapLiteral(
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.mapLiteralEntry3('a', 'b')],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2481,9 +2481,9 @@
AstTestFactory.typeName4('String'),
AstTestFactory.typeName4('String')
]),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.mapLiteralEntry3('a', 'b')],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2494,24 +2494,24 @@
astFactory.setOrMapLiteral(
typeArguments:
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [
AstTestFactory.integer(0),
astFactory.forElement(
- forKeyword: Tokens.FOR,
- leftParenthesis: Tokens.OPEN_PAREN,
+ forKeyword: Tokens.for_(),
+ leftParenthesis: Tokens.openParenthesis(),
forLoopParts: astFactory.forEachPartsWithIdentifier(
identifier: AstTestFactory.identifier3('e'),
- inKeyword: Tokens.IN,
+ inKeyword: Tokens.in_(),
iterable: AstTestFactory.identifier3('l'),
),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
body: AstTestFactory.integer(0)),
astFactory.ifElement(
- ifKeyword: Tokens.IF,
- leftParenthesis: Tokens.OPEN_PAREN,
+ ifKeyword: Tokens.if_(),
+ leftParenthesis: Tokens.openParenthesis(),
condition: AstTestFactory.identifier3('b'),
- rightParenthesis: Tokens.CLOSE_PAREN,
+ rightParenthesis: Tokens.closeParenthesis(),
thenElement: AstTestFactory.integer(1),
),
astFactory.spreadElement(
@@ -2520,13 +2520,13 @@
expression: astFactory.listLiteral(
null,
null,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET,
+ Tokens.closeSquareBracket(),
),
)
],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2536,9 +2536,9 @@
'const {0}',
astFactory.setOrMapLiteral(
constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.integer(0)],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2550,9 +2550,9 @@
constKeyword: TokenFactory.tokenFromKeyword(Keyword.CONST),
typeArguments:
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.integer(0)],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2561,9 +2561,9 @@
_assertSource(
'{0}',
astFactory.setOrMapLiteral(
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.integer(0)],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2574,9 +2574,9 @@
astFactory.setOrMapLiteral(
typeArguments:
AstTestFactory.typeArgumentList([AstTestFactory.typeName4('int')]),
- leftBracket: Tokens.OPEN_CURLY_BRACKET,
+ leftBracket: Tokens.openCurlyBracket(),
elements: [AstTestFactory.integer(0)],
- rightBracket: Tokens.CLOSE_CURLY_BRACKET,
+ rightBracket: Tokens.closeCurlyBracket(),
),
);
}
@@ -2633,9 +2633,9 @@
expression: astFactory.listLiteral(
null,
null,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET)));
+ Tokens.closeSquareBracket())));
}
@failingTest
@@ -2650,9 +2650,9 @@
expression: astFactory.listLiteral(
null,
null,
- Tokens.OPEN_SQUARE_BRACKET,
+ Tokens.openSquareBracket(),
[AstTestFactory.integer(0)],
- Tokens.CLOSE_SQUARE_BRACKET)));
+ Tokens.closeSquareBracket())));
}
void test_visitStringInterpolation() {
diff --git a/pkg/compiler/lib/src/util/command_line.dart b/pkg/compiler/lib/src/util/command_line.dart
index 87c38e9..6930227 100644
--- a/pkg/compiler/lib/src/util/command_line.dart
+++ b/pkg/compiler/lib/src/util/command_line.dart
@@ -2,34 +2,36 @@
// for details. All rights reserved. Use of this source code is governed by a
// BSD-style license that can be found in the LICENSE file.
+// @dart=2.12
+
library dart2js.util.command_line;
/// The accepted escapes in the input of the --batch processor.
///
/// Contrary to Dart strings it does not contain hex escapes (\u or \x).
-Map<String, String> ESCAPE_MAPPING = const {
- "n": "\n",
- "r": "\r",
- "t": "\t",
- "b": "\b",
- "f": "\f",
- "v": "\v",
- "\\": "\\",
+const Map<String, String> ESCAPE_MAPPING = {
+ 'n': '\n',
+ 'r': '\r',
+ 't': '\t',
+ 'b': '\b',
+ 'f': '\f',
+ 'v': '\v',
+ '\\': '\\',
};
-/// Splits the line similar to how a shell would split arguments. If [windows]
+/// Splits the [line] similar to how a shell would split arguments. If [windows]
/// is `true` escapes will be handled like on the Windows command-line.
///
/// Example:
///
-/// splitline("""--args "ab"c 'with " \'spaces'""").forEach(print);
+/// splitLine("""--args "ab"c 'with " \'spaces'""").forEach(print);
/// // --args
/// // abc
/// // with " 'spaces
-List<String> splitLine(String line, {bool windows: false}) {
+List<String> splitLine(String line, {bool windows = false}) {
List<String> result = <String>[];
bool inQuotes = false;
- String openingQuote;
+ String? openingQuote;
StringBuffer buffer = new StringBuffer();
for (int i = 0; i < line.length; i++) {
String c = line[i];
@@ -44,7 +46,7 @@
}
if (c == '\\') {
if (i == line.length - 1) {
- throw new FormatException("Unfinished escape: $line");
+ throw new FormatException('Unfinished escape: $line');
}
if (windows) {
String next = line[i + 1];
@@ -57,20 +59,21 @@
i++;
c = line[i];
- String mapped = ESCAPE_MAPPING[c];
- if (mapped == null) mapped = c;
+ String mapped = ESCAPE_MAPPING[c] ?? c;
buffer.write(mapped);
continue;
}
}
- if (!inQuotes && c == " ") {
- if (buffer.isNotEmpty) result.add(buffer.toString());
- buffer.clear();
+ if (!inQuotes && c == ' ') {
+ if (buffer.isNotEmpty) {
+ result.add(buffer.toString());
+ buffer.clear();
+ }
continue;
}
buffer.write(c);
}
- if (inQuotes) throw new FormatException("Unclosed quotes: $line");
+ if (inQuotes) throw new FormatException('Unclosed quotes: $line');
if (buffer.isNotEmpty) result.add(buffer.toString());
return result;
}
diff --git a/tools/VERSION b/tools/VERSION
index 8d3dadb..ddc628a 100644
--- a/tools/VERSION
+++ b/tools/VERSION
@@ -27,5 +27,5 @@
MAJOR 2
MINOR 14
PATCH 0
-PRERELEASE 183
+PRERELEASE 184
PRERELEASE_PATCH 0
\ No newline at end of file