File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11let
22 // Entry point for routing the calls for various AST node "Kind"s
3+ // TODO: record
34 // TODO: unary
45 // TODO: throw
56 handleExp = (x) =>
1213 if (kind = "FieldAccess") then fieldAccessExp(x) else
1314 if (kind = "Identifier") then identifierExp(x) else
1415 if (kind = "Constant") then constantExp(x) else
16+ if (kind = "Record") then recordExp(x) else
17+ if (kind = "Unary") then unaryExp(x) else
18+ if (kind = "Throw") then throwExp(x) else
1519 Text.Format("Unkonw Kind: #{0}",{kind})
1620 in
1721 expr,
22+
23+ recordExp = (x) =>
24+ let
25+ z = ...
26+ in
27+ z,
28+
29+ unaryExp = (x) =>
30+ let
31+ z = ...
32+ in
33+ z,
34+
35+ throwExp = (x) =>
36+ let
37+ z = ...
38+ in
39+ z,
1840
1941 // "Invocation" node handling
2042 invocationExp = (x) =>
103125 // Function to decompile
104126 fn = List.Range,
105127 // Getting a "shalow" view on the AST
106- AST = Value.ResourceExpression(fn)[Expression][Arguments]{0}[Function][Expression][Expression],
128+ // TODO: replace with a search
129+ AST =
130+ try Value.ResourceExpression(fn)[Expression][Function][Expression] otherwise
131+ Value.ResourceExpression(fn)[Expression][Arguments]{0}[Function][Expression][Expression],
107132 // Start
108133 expression = run(AST)
109134in
You can’t perform that action at this time.
0 commit comments