This CL adds a simple spell-checker, adds a spell-checking-phase to
messages_test to spell-check our messages, adds a new test that
spell-check our dart-code and fixes a lot of spelling mistakes / typos.
Change-Id: I8943a5bd67970e9a8a775251ae0aa97799eab097
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/112346
Commit-Queue: Jens Johansen <jensj@google.com>
Reviewed-by: Johnni Winther <johnniwinther@google.com>
This CL is the next step in moving the language version comment
detecting from parser to scanner.
* update the scanner to produce a new LanguageVersionToken
* expose the languageVersion in the scanner result
* include languageVersion as a comment if includeComments == true
* rename languageVersionToken to languageVersion
Change-Id: Ie6be6e95e2fa6b7d3b9123bea556bcd5e89888f8
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/100880
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This is the first in a multi step process of moving scanner errors
out of the token stream and into a separate errors list produced by the scanner.
As of this CL, if the scanner.reportErrors flag is set then the scanner will report
the unterminated string error via the errors list rather than the token stream.
Once all scanner clients have been updated to process errors reported
through the scanner's error list, then the scanner.reportErrors flag will be removed.
Change-Id: I6ef73df786d98a387cbf2044c4c8325412573f11
Reviewed-on: https://dart-review.googlesource.com/c/80509
Reviewed-by: Peter von der Ahé <ahe@google.com>
Commit-Queue: Dan Rubel <danrubel@google.com>
This CL updates SyntheticToken to have a new beforeSynthetic field
and the fasta scanner to set that field for synthetic ")", "]", and "}" tokens.
This makes it much more efficient for the parser to move a synthetic
closer when the scanner has inserted it in a less than optimal location
in the token stream.
This CL also addresses a comment in
Address comment in https://dart-review.googlesource.com/c/sdk/+/51561
Change-Id: I7f056ac25f2ca4cf5edb0ef4bce7f1e9dd76de9a
Reviewed-on: https://dart-review.googlesource.com/52040
Commit-Queue: Dan Rubel <danrubel@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
This includes Fasta, tools and observatory, so the checked-in SDK must
have the lower-case constants.
Change-Id: I8380ad041ad058f7d02ae19caccfecd434d13d75
Reviewed-on: https://dart-review.googlesource.com/50201
Commit-Queue: Lasse R.H. Nielsen <lrn@google.com>
Reviewed-by: Leaf Petersen <leafp@google.com>
This updates the fasta scanner to translate the remaining
previously untranslated error codes so that they will be seen
by the analyzer when the fasta scanner is used by analyzer.
R=ahe@google.com
Review-Url: https://codereview.chromium.org/2923113002 .
* improve fasta interpolation recovery by adding closing brace
for unterminated string
* update analyzer scanner test because fasta does not support
does not support \r line endings
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2910583002 .
This eliminates much of the duplication between the two token hierarchies
by merging much of the fasta.Token hierarchy into the analyzer.Token.
* merge token hierarchies
* cleanup fasta.Token.copy()
* set preceedingComments field via constructor
* replace isBuiltInIdentifier --> type.isBuiltIn
* change all fasta.Token references to analyzer.Token
* move fasta.Token.value() implementation into analyzer.SimpleToken
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2890523002 .
* move isPseudo getter out of Token into TokenType
* move special case charCount logic out of fasta.Token into fasta.ErrorToken
* move more accessors from fasta.Token into analyzer.Token
* add @overrides to denote which methods have been declared in analyzer.Token
* make fasta LazySubstring and its subclasses private
* rename fasta.previousToken to previous to match analyzer.Token
* flatten fasta.Token.preceedingCommentTokens into preceedingComments
* normalize fasta.Token.next and analyzer.Token.next
R=scheglov@google.com
Review-Url: https://codereview.chromium.org/2872433005 .
* add new SyntheticSymbolToken class
* whenever fasta inserts a closer ( '}', ']', ')' ) that is not part
of the original source, ensure that the inserted closer is
synthetic (isSynthetic returns true) and in the token stream
* make EOF a synthetic token
R=ahe@google.com, scheglov@google.com
Review-Url: https://codereview.chromium.org/2777153002 .
* update the fasta scanner to generate comment and dartdoc tokens
* replace fasta.preceedingComments field
with preceedingCommentTokens field and preceedingComments getter/setter
* update token translator
R=paulberry@google.com
Review-Url: https://codereview.chromium.org/2763833002 .