Skip to content

Commit

Permalink
[parser] Rename accidentally committed 'allowLazyFoo' parameter
Browse files Browse the repository at this point in the history
In https://dart-review.googlesource.com/c/sdk/+/382162 I accidentally
left in the debug-named version of a parameter. This renames it to not
be called foo.

Change-Id: Ib9421b4a5ee63b9b6296a09d14b4ab73ae414742
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/403586
Commit-Queue: Jens Johansen <[email protected]>
Reviewed-by: Johnni Winther <[email protected]>
  • Loading branch information
jensjoha authored and Commit Queue committed Jan 9, 2025
1 parent 9b631bf commit ad562fd
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 8 deletions.
4 changes: 1 addition & 3 deletions pkg/_fe_analyzer_shared/lib/src/scanner/string_scanner.dart
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,7 @@ class StringScanner extends AbstractScanner {
bool asciiOnly, int extraOffset, bool allowLazy) {
return new StringTokenImpl.fromSubstring(
type, _string, start, scanOffset + extraOffset, tokenStart,
canonicalize: true,
precedingComments: comments,
allowLazyFoo: allowLazy);
canonicalize: true, precedingComments: comments, allowLazy: allowLazy);
}

@override
Expand Down
8 changes: 4 additions & 4 deletions pkg/_fe_analyzer_shared/lib/src/scanner/token_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,10 +54,10 @@ class StringTokenImpl extends SimpleToken implements StringToken {
TokenType type, String data, int start, int end, int charOffset,
{bool canonicalize = false,
CommentToken? precedingComments,
bool allowLazyFoo = true})
bool allowLazy = true})
: super(type, charOffset, precedingComments) {
int length = end - start;
if (!allowLazyFoo || length <= LAZY_THRESHOLD) {
if (!allowLazy || length <= LAZY_THRESHOLD) {
valueOrLazySubstring = canonicalize
? canonicalizeSubString(data, start, end)
: data.substring(start, end);
Expand All @@ -73,10 +73,10 @@ class StringTokenImpl extends SimpleToken implements StringToken {
*/
StringTokenImpl.fromUtf8Bytes(TokenType type, Uint8List data, int start,
int end, bool asciiOnly, int charOffset,
{CommentToken? precedingComments, bool allowLazyFoo = true})
{CommentToken? precedingComments, bool allowLazy = true})
: super(type, charOffset, precedingComments) {
int length = end - start;
if (!allowLazyFoo || length <= LAZY_THRESHOLD) {
if (!allowLazy || length <= LAZY_THRESHOLD) {
valueOrLazySubstring =
canonicalizeUtf8SubString(data, start, end, asciiOnly);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -251,7 +251,7 @@ class Utf8BytesScanner extends AbstractScanner {
bool asciiOnly, int extraOffset, bool allowLazy) {
return new StringTokenImpl.fromUtf8Bytes(
type, _bytes, start, byteOffset + extraOffset, asciiOnly, tokenStart,
precedingComments: comments, allowLazyFoo: allowLazy);
precedingComments: comments, allowLazy: allowLazy);
}

@override
Expand Down

0 comments on commit ad562fd

Please sign in to comment.