Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(13)

Unified Diff: pkg/front_end/lib/src/fasta/parser/identifier_context.dart

Issue 2735623002: Parse #operator symbol literals with Fasta. (Closed)
Patch Set: Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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});
« no previous file with comments | « pkg/front_end/lib/src/fasta/analyzer/ast_builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698