Skip to content

Commit b202a25

Browse files
authored
Merge pull request #58 from fable-compiler/simplify-open
fix: use plain int/string types for open
2 parents eceae9b + a634168 commit b202a25

File tree

9 files changed

+305
-197
lines changed

9 files changed

+305
-197
lines changed

.config/dotnet-tools.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@
33
"isRoot": true,
44
"tools": {
55
"paket": {
6-
"version": "6.2.1",
6+
"version": "7.1.5",
77
"commands": [
88
"paket"
99
]
1010
},
1111
"fantomas-tool": {
12-
"version": "4.5.10",
12+
"version": "4.7.9",
1313
"commands": [
1414
"fantomas"
1515
]

src/stdlib/Ast.fs

Lines changed: 45 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ type _identifier = string
88

99

1010
type AST =
11-
abstract foo : int
11+
abstract foo: int
1212

1313
type ``mod`` =
1414
inherit AST
@@ -18,11 +18,11 @@ type expr =
1818

1919
type Module =
2020
inherit ``mod``
21-
abstract body : stmt array
21+
abstract body: stmt array
2222

2323
type Expression =
2424
inherit ``mod``
25-
abstract body : expr
25+
abstract body: expr
2626

2727
type stmt =
2828
inherit AST
@@ -31,74 +31,74 @@ type stmt =
3131
type FunctionDef =
3232
inherit stmt
3333

34-
abstract name : _identifier
35-
abstract args : arguments
36-
abstract body : stmt array
37-
abstract decorator_list : expr array
38-
abstract returns : expr option
34+
abstract name: _identifier
35+
abstract args: arguments
36+
abstract body: stmt array
37+
abstract decorator_list: expr array
38+
abstract returns: expr option
3939

4040
type ClassDef =
4141
inherit stmt
42-
abstract name : _identifier
43-
abstract bases : expr array
44-
abstract keywords : keyword array
45-
abstract body : stmt array
46-
abstract decorator_list : expr array
42+
abstract name: _identifier
43+
abstract bases: expr array
44+
abstract keywords: keyword array
45+
abstract body: stmt array
46+
abstract decorator_list: expr array
4747

4848
type Return =
4949
inherit stmt
50-
abstract value : expr option
50+
abstract value: expr option
5151

5252
type Delete =
5353
inherit stmt
54-
abstract targets : expr array
54+
abstract targets: expr array
5555

5656
type Assign =
5757
inherit stmt
58-
abstract targets : expr array
59-
abstract value : expr
58+
abstract targets: expr array
59+
abstract value: expr
6060

6161
type Import =
6262
inherit stmt
63-
abstract names : alias array
63+
abstract names: alias array
6464

6565
type ImportFrom =
6666
inherit stmt
67-
abstract ``module`` : _identifier option
68-
abstract names : alias array
69-
abstract level : int
67+
abstract ``module``: _identifier option
68+
abstract names: alias array
69+
abstract level: int
7070

7171
type If =
7272
inherit stmt
73-
abstract test : expr
74-
abstract body : stmt array
75-
abstract orelse : stmt array
73+
abstract test: expr
74+
abstract body: stmt array
75+
abstract orelse: stmt array
7676

7777
type arguments =
7878
inherit AST
7979

80-
abstract posonlyargs : arg array
81-
abstract args : arg array
82-
abstract vararg : arg option
83-
abstract kwonlyargs : arg array
84-
abstract kw_defaults : expr option list
85-
abstract kwarg : arg option
86-
abstract defaults : expr array
80+
abstract posonlyargs: arg array
81+
abstract args: arg array
82+
abstract vararg: arg option
83+
abstract kwonlyargs: arg array
84+
abstract kw_defaults: expr option list
85+
abstract kwarg: arg option
86+
abstract defaults: expr array
8787

8888
type arg =
8989
inherit AST
90-
abstract arg : _identifier
91-
abstract annotation : expr option
90+
abstract arg: _identifier
91+
abstract annotation: expr option
9292

9393
type keyword =
9494
inherit AST
95-
abstract arg : _identifier option
96-
abstract value : expr
95+
abstract arg: _identifier option
96+
abstract value: expr
9797

9898
type alias =
9999
inherit AST
100-
abstract name : _identifier
101-
abstract asname : _identifier option
100+
abstract name: _identifier
101+
abstract asname: _identifier option
102102

103103

104104
[<StringEnum>]
@@ -108,17 +108,17 @@ type Mode =
108108

109109
type IExports =
110110
/// Parse the source into an AST node
111-
abstract parse : string -> AST
112-
abstract parse : string * filename: string -> AST
113-
abstract parse : string * filename: string * mode: Mode -> AST
114-
abstract unparse : astObj: AST -> string
115-
abstract walk : node: AST -> AST array
111+
abstract parse: string -> AST
112+
abstract parse: string * filename: string -> AST
113+
abstract parse: string * filename: string * mode: Mode -> AST
114+
abstract unparse: astObj: AST -> string
115+
abstract walk: node: AST -> AST array
116116
/// Return a formatted dump of the tree in node.
117-
abstract dump : node: AST -> string
117+
abstract dump: node: AST -> string
118118
/// Return a formatted dump of the tree in node.
119-
abstract dump : node: AST * annotate_fields: bool -> string
119+
abstract dump: node: AST * annotate_fields: bool -> string
120120
/// Return a formatted dump of the tree in node.
121-
abstract dump : node: AST * annotate_fields: bool * include_attributes: bool -> string
121+
abstract dump: node: AST * annotate_fields: bool * include_attributes: bool -> string
122122

123123
[<ImportAll("ast")>]
124124
let ast: IExports = nativeOnly

0 commit comments

Comments
 (0)