Commits

kevinclancy committed 7da77fa

added a few comments and minor cosmetic adjustments

Comments (0)

Files changed (2)

LoveStudio/LuaAnalyzer/Syntax.fs

     | ErrorField(_,_) ->
         ([],[],[])
 
+/// Gets the range of character indices that a statement occupies in
+/// a file.
 let getStatementRange (stmt : Statement) : Range =
     match stmt with
     | If(_,rng)
     | ErrorStatement(_,rng) ->
         rng
 
+/// Gets the range of character indices that an expression occupies
+/// in a file.
 let getExprRange (expr : Expr) : Range =
     match expr with
     | Number(_,rng)

LoveStudio/LuaAnalyzer/Typechecker.fs

             let ctxt' = ctxt.AddValue(name,counterField)
             typeCheckStat ctxt' body
         | _ ->
-            failwith "sgadsgda"
+            failwith "unreachable"
     | ForGeneric(vars,gens,body,_) ->
         let makeNamedField (nameExpr : TypedExpr) =
             let (NameExpr(name,rng)) = nameExpr