adding packages

This commit is contained in:
2026-01-15 14:38:46 -08:00
parent ef86e3ab6a
commit 6869cf47e5
5253 changed files with 726695 additions and 34 deletions
+49
View File
@@ -0,0 +1,49 @@
import 'package:flutter_ast_core/flutter_ast_core.dart';
import 'analyzer.dart';
extension LiteralImplUtils on LiteralImpl {
DartCore toDartCore() {
final value = this;
if (value is BooleanLiteralImpl) {
return DartCore(
type: 'bool',
value: value.value.toString(),
);
}
if (value is IntegerLiteralImpl) {
return DartCore(
type: 'int',
value: value.value.toString(),
);
}
if (value is DoubleLiteralImpl) {
return DartCore(
type: 'double',
value: value.value.toString(),
);
}
if (value is StringLiteralImpl) {
return DartCore(
type: 'String',
value: value.stringValue.toString(),
);
}
if (value is SetOrMapLiteralImpl) {
return DartCore(
type: 'Map',
value: value.toString(),
);
}
if (value is ListLiteralImpl) {
return DartCore(
type: 'List',
value: value.toString(),
);
}
return DartCore(
type: null,
value: value.toString(),
);
}
}