Skip to content

Commit

Permalink
#1678 moving to flutter 3.24+
Browse files Browse the repository at this point in the history
  • Loading branch information
kmahmood74 committed Oct 8, 2024
1 parent 8a1fcc1 commit 9bf53d0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 5 deletions.
2 changes: 1 addition & 1 deletion modules/parsejs_null_safety/lib/src/lexer.dart
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ bool isEOL(int x) {

class Lexer {
Lexer(String text,
{this.filename, this.currentLine: 1, this.index: 0, this.endOfFile}) {
{this.filename, this.currentLine=1, this.index= 0, this.endOfFile}) {
input = text.codeUnits;
if (endOfFile == null) {
endOfFile = input.length;
Expand Down
6 changes: 3 additions & 3 deletions modules/parsejs_null_safety/lib/src/parser.dart
Original file line number Diff line number Diff line change
Expand Up @@ -541,7 +541,7 @@ class Parser {
return exp;
}

Expression parseAssignment({bool allowIn: true}) {
Expression parseAssignment({bool allowIn= true}) {
int? start = token!.startOffset;
Expression exp = parseConditional(allowIn);
if (token!.type == Token.ASSIGN) {
Expand All @@ -555,7 +555,7 @@ class Parser {
return exp;
}

Expression parseExpression({bool allowIn: true}) {
Expression parseExpression({bool allowIn= true}) {
int? start = token!.startOffset;
Expression exp = parseAssignment(allowIn: allowIn);
if (token!.type == Token.COMMA) {
Expand Down Expand Up @@ -589,7 +589,7 @@ class Parser {
..line = line;
}

VariableDeclaration parseVariableDeclarationList({bool allowIn: true}) {
VariableDeclaration parseVariableDeclarationList({bool allowIn= true}) {
int? start = token!.startOffset;
int? line = token!.line;
assert(token!.text == 'var');
Expand Down
6 changes: 5 additions & 1 deletion modules/parsejs_null_safety/test/ast_json.dart
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ class Ast2Json extends Visitor<Object?> {
bool ranges;
bool lines;

Ast2Json({this.ranges: false, this.lines: false});
Ast2Json({this.ranges= false, this.lines= false});

// NOTE: The order in which properties are mentioned is significant, since properties
// must be mentioned in the same order for our JSON comparator to work.
Expand Down Expand Up @@ -255,4 +255,8 @@ class Ast2Json extends Visitor<Object?> {

visitRegexp(RegexpExpression node) =>
{'type': 'Literal', 'value': <String, Object>{}, 'raw': node.regexp};

@override
Object? visitArrowFunctionNode(ArrowFunctionNode node) {
}
}

0 comments on commit 9bf53d0

Please sign in to comment.