File tree 6 files changed +48
-8
lines changed
6 files changed +48
-8
lines changed Original file line number Diff line number Diff line change @@ -15,10 +15,52 @@ interface DartFile {
15
15
classes : Array < DartClass > ;
16
16
enums : Array < DartEnum > ;
17
17
fields : Array < DartField > ;
18
- imports : Array < string > ;
18
+ imports : Array < DartImport > ;
19
19
methods : Array < DartMethod > ;
20
20
}
21
21
22
+ interface DartImport extends AstNode {
23
+ /**
24
+ * @example
25
+ * `import 'package:foo/foo.dart';`
26
+ *
27
+ * => `package:foo/foo.dart`
28
+ */
29
+ uri ?: string ;
30
+
31
+ /**
32
+ * @example
33
+ * `import 'package:foo/foo.dart' as foo;`
34
+ *
35
+ * => `foo`
36
+ */
37
+ prefix ?: string ;
38
+
39
+ /**
40
+ * @example
41
+ * `import 'package:foo/foo.dart' show Foo, Bar;`
42
+ * => `['Foo', 'Bar']`
43
+ *
44
+ * If the show is falsy, it means that all the symbols are imported.
45
+ * If the show is an empty array, it also means that all the symbols are imported.
46
+ *
47
+ * => `show?.length > 0`
48
+ */
49
+ show ?: Array < string > ;
50
+
51
+ /**
52
+ * @example
53
+ * `import 'package:foo/foo.dart' hide Foo, Bar;`
54
+ * => `['Foo', 'Bar']`
55
+ *
56
+ * If the hide is falsy, it means that no symbols are hidden.
57
+ * If the hide is an empty array, it also means that no symbols are hidden.
58
+ *
59
+ * => `hide?.length > 0`
60
+ */
61
+ hide ?: Array < string > ;
62
+ }
63
+
22
64
interface DartClass extends AstNode {
23
65
constructors : Array < DartConstructor > ;
24
66
comments : Array < DartComment > ;
Original file line number Diff line number Diff line change 1
1
{
2
2
"name" : " flutter-ast" ,
3
- "version" : " 0.0.3-3 " ,
3
+ "version" : " 0.0.4 " ,
4
4
"description" : " A Pure Dart File to Ast Serializer/Deserializer." ,
5
5
"main" : " index.js" ,
6
6
"typings" : " index.d.ts" ,
Original file line number Diff line number Diff line change @@ -189,7 +189,7 @@ packages:
189
189
name: flutter_ast_core
190
190
url: "https://pub.dartlang.org"
191
191
source: hosted
192
- version: "0.0.4"
192
+ version: "0.0.4+1 "
193
193
freezed_annotation:
194
194
dependency: transitive
195
195
description:
Original file line number Diff line number Diff line change 1
1
name : flutter_ast
2
2
description : A Pure Dart File to Ast Serializer/Deserializer.
3
- version : 0.0.4
3
+ version : 0.0.4+1
4
4
homepage : https://github.com/gridaco/flutter-support/tree/main/flutter_ast/
5
5
license : MIT
6
6
@@ -15,7 +15,7 @@ dependencies:
15
15
mustache_template : ^2.0.0
16
16
_fe_analyzer_shared : ^52.0.0
17
17
recase : ^4.1.0
18
- flutter_ast_core : ^0.0.4
18
+ flutter_ast_core : ^0.0.4+1
19
19
# flutter_ast_core:
20
20
# path: ../flutter_ast_core
21
21
Original file line number Diff line number Diff line change 1
- import 'dart:ffi' ;
2
-
3
1
import 'package:freezed_annotation/freezed_annotation.dart' ;
4
2
import 'ast_node.dart' ;
5
3
Original file line number Diff line number Diff line change 1
1
name : flutter_ast_core
2
2
description : Flutter AST Parser Core models for flutter_ast
3
- version : 0.0.4
3
+ version : 0.0.4+1
4
4
homepage : https://github.com/gridaco/flutter-support/tree/main/flutter_ast/flutter_ast_core
5
5
license : MIT
6
6
You can’t perform that action at this time.
0 commit comments