Skip to content

Commit 5f24e18

Browse files
authored
Cleanup of ast and tkinter modules (#74)
* Fixes for interfaces in ast and tkinter * Bump dep version * Update fable
1 parent cb4075d commit 5f24e18

File tree

3 files changed

+23
-1
lines changed

3 files changed

+23
-1
lines changed

.config/dotnet-tools.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
]
1010
},
1111
"fable": {
12-
"version": "4.0.0-theta-006",
12+
"version": "4.0.0-theta-008",
1313
"commands": [
1414
"fable"
1515
]

src/stdlib/Ast.fs

+18
Original file line numberDiff line numberDiff line change
@@ -7,27 +7,34 @@ open Fable.Core
77
type _identifier = string
88

99

10+
[<Import("AST", "ast")>]
1011
type AST =
1112
abstract foo: int
1213

14+
[<Import("mod", "ast")>]
1315
type ``mod`` =
1416
inherit AST
1517

18+
[<Import("expr", "ast")>]
1619
type expr =
1720
inherit AST
1821

22+
[<Import("Module", "ast")>]
1923
type Module =
2024
inherit ``mod``
2125
abstract body: stmt array
2226

27+
[<Import("Expression", "ast")>]
2328
type Expression =
2429
inherit ``mod``
2530
abstract body: expr
2631

32+
[<Import("Module", "ast")>]
2733
type stmt =
2834
inherit AST
2935

3036

37+
[<Import("FunctionDef", "ast")>]
3138
type FunctionDef =
3239
inherit stmt
3340

@@ -37,6 +44,7 @@ type FunctionDef =
3744
abstract decorator_list: expr array
3845
abstract returns: expr option
3946

47+
[<Import("ClassDef", "ast")>]
4048
type ClassDef =
4149
inherit stmt
4250
abstract name: _identifier
@@ -45,35 +53,42 @@ type ClassDef =
4553
abstract body: stmt array
4654
abstract decorator_list: expr array
4755

56+
[<Import("Return", "ast")>]
4857
type Return =
4958
inherit stmt
5059
abstract value: expr option
5160

61+
[<Import("Delete", "ast")>]
5262
type Delete =
5363
inherit stmt
5464
abstract targets: expr array
5565

66+
[<Import("Assign", "ast")>]
5667
type Assign =
5768
inherit stmt
5869
abstract targets: expr array
5970
abstract value: expr
6071

72+
[<Import("Import", "ast")>]
6173
type Import =
6274
inherit stmt
6375
abstract names: alias array
6476

77+
[<Import("ImportFrom", "ast")>]
6578
type ImportFrom =
6679
inherit stmt
6780
abstract ``module``: _identifier option
6881
abstract names: alias array
6982
abstract level: int
7083

84+
[<Import("If", "ast")>]
7185
type If =
7286
inherit stmt
7387
abstract test: expr
7488
abstract body: stmt array
7589
abstract orelse: stmt array
7690

91+
[<Import("arguments", "ast")>]
7792
type arguments =
7893
inherit AST
7994

@@ -85,16 +100,19 @@ type arguments =
85100
abstract kwarg: arg option
86101
abstract defaults: expr array
87102

103+
[<Import("arg", "ast")>]
88104
type arg =
89105
inherit AST
90106
abstract arg: _identifier
91107
abstract annotation: expr option
92108

109+
[<Import("keyword", "ast")>]
93110
type keyword =
94111
inherit AST
95112
abstract arg: _identifier option
96113
abstract value: expr
97114

115+
[<Import("alias", "ast")>]
98116
type alias =
99117
inherit AST
100118
abstract name: _identifier

src/stdlib/TkInter.fs

+4
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,17 @@ module Fable.Python.TkInter
22

33
open Fable.Core
44

5+
[<Import("Event", "tkinter")>]
56
type Event =
67
abstract member x : int
78
abstract member y : int
89

10+
[<Import("Misc", "tkinter")>]
911
type Misc =
1012
abstract member bind : sequence: string * func: (Event -> unit) -> string option
1113

14+
[<Import("Wm", "tkinter")>]
15+
1216
type Wm =
1317
abstract member title : unit -> string
1418
abstract member title : string: string -> unit

0 commit comments

Comments
 (0)