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

Issue 2842643004: flatten Keyword into TokenType (Closed)

Created:
3 years, 8 months ago by danrubel
Modified:
3 years, 7 months ago
Reviewers:
ahe, Paul Berry
CC:
reviews_dartlang.org, dart-fe-team+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

flatten Keyword into TokenType This change makes Keyword extend TokenType so that 1) the TokenType of a KeywordToken is the keyword itself 2) TokenType.KEYWORD can be removed This simplifies the issue of determining the precedence when handling "as" and "is" which we consider to be keywords and the spec considers to be operators. It also addresses the situation where analyzer considers these two keywords to have the type TokenType.KEYWORD while fasta considers them to have their own unique token type. * change Keyword to extend TokenType * make TokenType.AS be the same object as Keyword.AS * make TokenType.IS be the same object as Keyword.IS * rename Keyword.syntax --> Keyword.lexeme * replace token.type == TokenType.KEYWORD with token.type.isKeyword * remove TokenType.KEYWORD * remove unnecessary Keyword.info method This has been split into two separate CLs so that existing references can be updated prior to removal of the deprecated API. See * https://codereview.chromium.org/2842213003/ * https://codereview.chromium.org/2848493003/

Patch Set 1 #

Unified diffs Side-by-side diffs Delta from patch set Stats (+188 lines, -193 lines) Patch
M pkg/analysis_server/lib/src/provisional/completion/dart/completion_target.dart View 3 chunks +3 lines, -5 lines 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/completion_manager.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analysis_server/lib/src/services/completion/dart/keyword_contributor.dart View 2 chunks +4 lines, -4 lines 0 comments Download
M pkg/analysis_server/lib/src/utilities/change_builder_dart.dart View 9 chunks +16 lines, -16 lines 0 comments Download
M pkg/analysis_server/test/services/completion/dart/keyword_contributor_test.dart View 2 chunks +3 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/dart/element/element.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/dart/element/type.dart View 3 chunks +4 lines, -4 lines 0 comments Download
M pkg/analyzer/lib/src/fasta/token_utils.dart View 3 chunks +9 lines, -9 lines 0 comments Download
M pkg/analyzer/lib/src/generated/error_verifier.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/analyzer/lib/src/generated/parser.dart View 9 chunks +14 lines, -16 lines 0 comments Download
M pkg/analyzer/lib/src/generated/resolver.dart View 3 chunks +3 lines, -3 lines 0 comments Download
M pkg/analyzer/lib/src/generated/type_system.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/analyzer/test/generated/parser_test.dart View 8 chunks +8 lines, -8 lines 0 comments Download
M pkg/compiler/lib/src/parser/element_listener.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/parser/parser.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/array_based_scanner.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/keyword_state.dart View 2 chunks +2 lines, -2 lines 0 comments Download
M pkg/front_end/lib/src/fasta/scanner/token.dart View 3 chunks +5 lines, -10 lines 0 comments Download
M pkg/front_end/lib/src/scanner/scanner.dart View 1 chunk +1 line, -1 line 0 comments Download
M pkg/front_end/lib/src/scanner/token.dart View 10 chunks +97 lines, -94 lines 0 comments Download
M pkg/front_end/test/precedence_info_test.dart View 1 chunk +2 lines, -1 line 0 comments Download
M pkg/front_end/test/scanner_test.dart View 4 chunks +7 lines, -7 lines 0 comments Download
M pkg/front_end/test/token_test.dart View 1 chunk +2 lines, -2 lines 0 comments Download

Messages

Total messages: 3 (2 generated)
danrubel
3 years, 8 months ago (2017-04-25 17:26:08 UTC) #2

          

Powered by Google App Engine
This is Rietveld 408576698