Commits

kevinclancy committed 2667dda

rewrote class.lua, begain cleaning up type collector code

  • Participants
  • Parent commits 812745b

Comments (0)

Files changed (3)

LoveStudio/Forms/Studio/Studio.cs

     }
 
     /// <summary>
-    /// Closes all editors.
+    /// Saves all open files, closes all editors.
     /// </summary>
     private void SaveAndCloseAllEditors()
     {

LoveStudio/LuaAnalyzer/TypedSyntax.fs

         // to yield the intuitive left-to-right format
         Some (List.rev names)
     | _ ->
-        None
+        None
+
+let rec (|EndsWith|) (ast : TypedStatement) =
+    match ast with
+    | Sequence(s0,DoNothing(_),_) ->
+        match s0 with
+        | EndsWith(finalStat) ->
+            finalStat
+        | _ ->
+            failwith "unreachable"
+    | Sequence(s0,s1,_) ->
+        match s1 with
+        | EndsWith(finalStat) ->
+            finalStat
+        | _ ->
+            failwith "unreachable"
+    | finalStatement ->
+        finalStatement

LoveStudio/LuaAnalyzer/TypedSyntax.fsi

 
 /// Matches expressions of the form name1.name2....namen, yielding
 /// the list [name1;name2;...,namen]
-val (|NameChain|_|) : TypedExpr -> Option<List<string>>
+val (|NameChain|_|) : TypedExpr -> Option<List<string>>
+
+val (|EndsWith|) : TypedStatement -> TypedStatement