You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Fix parsing of optional chaining in new expressions (#393)
* Implement check for optional chaining syntax error in new expressions
* Fix decorator parsing and formatting in AST to JS conversion
* Minor code style and XML doc corrections
Copy file name to clipboardExpand all lines: src/Esprima/Messages.cs
+5-3Lines changed: 5 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
namespaceEsprima;
2
2
3
3
// Error messages should be identical to V8.
4
+
// TODO: Replace the messages marked with "temporary" with the actual V8 messages once they become available (see https://github.com/v8/v8/blob/main/src/common/message-template.h).
4
5
internalstaticclassMessages
5
6
{
6
7
publicconststringArgumentsNotAllowedInClassField="'arguments' is not allowed in class field initializer or static initialization block";
@@ -22,8 +23,7 @@ internal static class Messages
22
23
publicconststringDuplicateConstructor="A class may only have one constructor";
23
24
publicconststringDuplicateParameter="Duplicate parameter name not allowed in this context";
24
25
publicconststringDuplicateProtoProperty="Duplicate __proto__ fields are not allowed in object literals";
25
-
// TODO: Replace this with the actual V8 message once it becomes available (see https://github.com/v8/v8/blob/main/src/common/message-template.h).
26
-
publicconststringDuplicateKeyInImportAttributes="Import attributes has duplicate key '{0}'";
26
+
publicconststringDuplicateKeyInImportAttributes="Import attributes has duplicate key '{0}'";// temporary
27
27
publicconststringForInOfLoopInitializer="'{0} loop variable declaration may not have an initializer";
28
28
publicconststringGeneratorInLegacyContext="Generator declarations are not allowed in legacy contexts";
Copy file name to clipboardExpand all lines: src/Esprima/Utils/JavascriptTextWriter.Enums.cs
+2-2Lines changed: 2 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -115,7 +115,7 @@ public enum StatementFlags
115
115
/// The statement comes last in the current statement list (more precisely, it is the right-most part in the textual representation of the current statement list).
116
116
/// </summary>
117
117
/// <remarks>
118
-
/// In the the visitation handlers of <see cref="AstToJavaScriptConverter"/> the flag is interpreted differently: it indicates that the statement comes last in the parent statement.
118
+
/// In the visitation handlers of <see cref="AstToJavaScriptConverter"/> the flag is interpreted differently: it indicates that the statement comes last in the parent statement.
119
119
/// (Upon visiting a statement, this flag of the parent and child statement gets combined to determine its effective value for the current statement list.)
120
120
/// </remarks>
121
121
IsRightMost=1<<2,
@@ -140,7 +140,7 @@ public enum ExpressionFlags
140
140
/// The expression comes first in the current expression tree, more precisely, it is the left-most part in the textual representation of the currently visited expression tree (incl. brackets).
141
141
/// </summary>
142
142
/// <remarks>
143
-
/// In the the visitation handlers of <see cref="AstToJavaScriptConverter"/> the flag is interpreted differently: it indicates that the expression comes first in the parent expression.
143
+
/// In the visitation handlers of <see cref="AstToJavaScriptConverter"/> the flag is interpreted differently: it indicates that the expression comes first in the parent expression.
144
144
/// (Upon visiting an expression, this flag of the parent and child expression gets combined to determine its effective value for the expression tree.)
0 commit comments