Chromium Code Reviews| Index: pkg/front_end/lib/src/fasta/parser/identifier_context.dart |
| diff --git a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart |
| index 9a9d774952faf563405ed4a535f5fad0cbf1d8ee..778bf81dad724442f6fd2a16aa273a5956b08382 100644 |
| --- a/pkg/front_end/lib/src/fasta/parser/identifier_context.dart |
| +++ b/pkg/front_end/lib/src/fasta/parser/identifier_context.dart |
| @@ -200,13 +200,12 @@ class IdentifierContext { |
| /// Identifier is the start of a reference occurring in a literal symbol (e.g. |
| /// `foo` in `#foo`). |
| static const literalSymbol = |
| - const IdentifierContext._('literalSymbol', isScopeReference: true); |
| + const IdentifierContext._('literalSymbol', inSymbol: true); |
|
Paul Berry
2017/03/06 13:54:06
Oh yeah, symbols shouldn't be looked up in the loc
|
| /// Identifier is part of a reference occurring in a literal symbol, but it's |
| /// not the first identifier of the reference (e.g. `foo` in `#prefix.foo`). |
| - static const literalSymbolContinuation = const IdentifierContext._( |
| - 'literalSymbolContinuation', |
| - isContinuation: true); |
| + static const literalSymbolContinuation = |
| + const IdentifierContext._('literalSymbolContinuation', inSymbol: true); |
|
Paul Berry
2017/03/06 13:54:06
I think we should keep `isContinuation: true`. Ev
scheglov
2017/03/06 15:44:55
Done.
|
| /// Identifier appears in an expression, and it does not immediately follow a |
| /// `.`. |
| @@ -236,6 +235,9 @@ class IdentifierContext { |
| /// declaration. |
| final bool inLibraryOrPartOfDeclaration; |
| + /// Indicates whether the identifier is within a symbol literal. |
| + final bool inSymbol; |
| + |
| /// Indicates whether the identifier follows a `.`. |
| final bool isContinuation; |
| @@ -244,6 +246,7 @@ class IdentifierContext { |
| const IdentifierContext._(this._name, |
| {this.inLibraryOrPartOfDeclaration: false, |
| + this.inSymbol: false, |
| this.isContinuation: false, |
| this.isScopeReference: false}); |