Skip to content

#2976. Update assertion texts according to the new spec #3000

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 8 additions & 6 deletions LanguageFeatures/Static-access-shorthand/grammar_A01_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

/// @assertion We introduce grammar productions of the form:
/// ```
/// <primary> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// <postfixExpression> ::= ... -- all current productions
/// | <staticMemberShorthand>
///
/// <constantPattern> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// | <staticMemberShorthand>
///
/// <staticMemberShorthand> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// <staticMemberShorthand> ::= <staticMemberShorthandHead> <selector*>
///
/// <staticMemberShorthandHead> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// ```
///
/// @description Checks that static members and constructors of a class can be
Expand Down
14 changes: 8 additions & 6 deletions LanguageFeatures/Static-access-shorthand/grammar_A01_t02.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

/// @assertion We introduce grammar productions of the form:
/// ```
/// <primary> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// <postfixExpression> ::= ... -- all current productions
/// | <staticMemberShorthand>
///
/// <constantPattern> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// | <staticMemberShorthand>
///
/// <staticMemberShorthand> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// <staticMemberShorthand> ::= <staticMemberShorthandHead> <selector*>
///
/// <staticMemberShorthandHead> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// ```
///
/// @description Checks that static members of a mixin can be accessed using the
Expand Down
14 changes: 8 additions & 6 deletions LanguageFeatures/Static-access-shorthand/grammar_A01_t03.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

/// @assertion We introduce grammar productions of the form:
/// ```
/// <primary> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// <postfixExpression> ::= ... -- all current productions
/// | <staticMemberShorthand>
///
/// <constantPattern> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// | <staticMemberShorthand>
///
/// <staticMemberShorthand> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// <staticMemberShorthand> ::= <staticMemberShorthandHead> <selector*>
///
/// <staticMemberShorthandHead> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// ```
///
/// @description Checks that static members and values of an enum can be
Expand Down
14 changes: 8 additions & 6 deletions LanguageFeatures/Static-access-shorthand/grammar_A01_t04.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

/// @assertion We introduce grammar productions of the form:
/// ```
/// <primary> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// <postfixExpression> ::= ... -- all current productions
/// | <staticMemberShorthand>
///
/// <constantPattern> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// | <staticMemberShorthand>
///
/// <staticMemberShorthand> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// <staticMemberShorthand> ::= <staticMemberShorthandHead> <selector*>
///
/// <staticMemberShorthandHead> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// ```
///
/// @description Checks that static members and constructors of an extension
Expand Down
14 changes: 8 additions & 6 deletions LanguageFeatures/Static-access-shorthand/grammar_A02_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,17 @@

/// @assertion We introduce grammar productions of the form:
/// ```
/// <primary> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// <postfixExpression> ::= ... -- all current productions
/// | <staticMemberShorthand>
///
/// <constantPattern> ::= ... -- all current productions
/// | <staticMemberShorthand>
/// | <staticMemberShorthand>
///
/// <staticMemberShorthand> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// <staticMemberShorthand> ::= <staticMemberShorthandHead> <selector*>
///
/// <staticMemberShorthandHead> ::=
/// '.' (<identifier> | 'new') -- shorthand qualified name
/// | 'const' '.' (<identifier> | 'new') <arguments> -- shorthand object creation
/// ```
///
/// @description Checks that it is a syntax error to use a `new` keyword in the
Expand Down
7 changes: 4 additions & 3 deletions LanguageFeatures/Static-access-shorthand/grammar_A03_t01.dart
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,11 @@
// 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.

/// @assertion We also add `.` to the tokens that an expression statement cannot
/// start with.
/// @assertion We also add . to the tokens that an expression statement cannot
/// start with. This doesn't affect starting with a double literal like `.42`,
/// since that's a different token than a single `.`.
///
/// @description Checks that numerical literal like `.123` is still not an error
/// @description Checks that numerical literal like `.42` is still not an error
/// @author [email protected]

// SharedOptions=--enable-experiment=enum-shorthands
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the forms `.id`, `.id(args)` and `.id<typeArgs>(args)` includes a type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the forms `.id`, `.id(args)` and `.id<typeArgs>(args)` includes a type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the forms `.id`, `.id(args)` and `.id<typeArgs>(args)` includes a type
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the form `.id<typeArgs>` includes a type alias expansion.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the form `.id<typeArgs>` includes a type alias expansion. Test unprefixed
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@
/// `.id(args)`, `.id<typeArgs>(args)`, `.new` or `.new(args)`.
/// ...
/// The general rule is that any of the expression forms above, starting with
/// `.id`, are treated exactly as if they were prefixed by a fresh identifier
/// `X` which denotes an accessible type alias for the greatest closure of the
/// context type scheme of the following primary and selector chain.
/// `.id`, are treated exactly as if they were preceded by a fresh prefixed
/// identifier `_p.C` which denotes the declaration of the type of the context
/// type scheme of the entire `<staticMemberShorthand>`.
///
/// @description Checks that the processing of the context type for shorthand
/// of the form `.id<typeArgs>` includes a type alias expansion. Test prefixed
Expand Down
Loading