Implement custom parser support for operations, enhance dim/addf to use it, and add a new load op.
This regresses parser error recovery in some cases (in invalid.mlir) which I'll
consider in a follow-up patch. The important thing in this patch is that the
parse methods in StandardOps.cpp are nice and simple.
PiperOrigin-RevId: 206023308
diff --git a/lib/Parser/TokenKinds.def b/lib/Parser/TokenKinds.def
index b9ef9b05..44a40ee 100644
--- a/lib/Parser/TokenKinds.def
+++ b/lib/Parser/TokenKinds.def
@@ -71,8 +71,8 @@
TOK_PUNCTUATION(r_paren, ")")
TOK_PUNCTUATION(l_brace, "{")
TOK_PUNCTUATION(r_brace, "}")
-TOK_PUNCTUATION(l_bracket, "[")
-TOK_PUNCTUATION(r_bracket, "]")
+TOK_PUNCTUATION(l_square, "[")
+TOK_PUNCTUATION(r_square, "]")
TOK_PUNCTUATION(less, "<")
TOK_PUNCTUATION(greater, ">")
TOK_PUNCTUATION(equal, "=")