Parse ML function arguments, return statement operands, and for statement loop header.
Loop bounds and presumed to be constants for now and are stored in ForStmt as affine constant expressions.  ML function arguments, return statement operands and loop variable name are dropped for now.

PiperOrigin-RevId: 205256208
diff --git a/test/IR/parser-errors.mlir b/test/IR/parser-errors.mlir
index 4f67c8e..49fd2da 100644
--- a/test/IR/parser-errors.mlir
+++ b/test/IR/parser-errors.mlir
@@ -130,12 +130,24 @@
 
 // -----
 
+mlfunc @malformed_for() {
+  for %i = 1 too 10 { // expected-error {{expected 'to' between bounds}}
+  }
+}
+
+// -----
+
 mlfunc @incomplete_for() {
-  for
+  for %i = 1 to 10 step 2
 }        // expected-error {{expected '{' before statement list}}
 
 // -----
 
+mlfunc @nonconstant_step(%1 : i32) {
+  for %2 = 1 to 5 step %1 { // expected-error {{expected non-negative integer for now}}
+
+// -----
+
 mlfunc @non_statement() {
   asd   // expected-error {{expected operation name in quotes}}
 }
@@ -160,7 +172,6 @@
   return
 }
 
-
 // -----
 
 cfgfunc @redef() {
@@ -168,4 +179,16 @@
   %x = "dim"(){index: 0} : ()->i32
   %x = "dim"(){index: 0} : ()->i32 // expected-error {{redefinition of SSA value %x}}
   return
-}
\ No newline at end of file
+}
+
+mlfunc @missing_rbrace() {
+  return %a
+mlfunc @d {return} // expected-error {{expected ',' or '}'}}
+
+// -----
+
+mlfunc @malformed_type(%a : intt) { // expected-error {{expected type}}
+}
+
+// -----
+