10
10
#include " mlir/Dialect/Polynomial/IR/Polynomial.h"
11
11
#include " mlir/Support/LLVM.h"
12
12
#include " mlir/Support/LogicalResult.h"
13
- #include " llvm/ADT/SmallSet.h"
14
13
#include " llvm/ADT/StringExtras.h"
15
14
#include " llvm/ADT/StringRef.h"
16
15
#include " llvm/ADT/StringSet.h"
@@ -51,7 +50,7 @@ ParseResult parseMonomial(AsmParser &parser, Monomial &monomial,
51
50
return success ();
52
51
}
53
52
54
- // A monomial can be a trailing constant term, as in `x + 1`
53
+ // A monomial can be a trailing constant term, as in `x + 1`.
55
54
if (failed (parser.parseOptionalKeyword (&variable))) {
56
55
// If neither a coefficient nor a variable was found, then it's effectively
57
56
// parsing an empty string.
@@ -64,11 +63,11 @@ ParseResult parseMonomial(AsmParser &parser, Monomial &monomial,
64
63
return success ();
65
64
}
66
65
67
- // Parse exponentiation symbol as **
68
- // We can't use caret because it's reserved for basic block identifiers
69
- // If no star is present, it's treated as a polynomial with exponent 1
66
+ // Parse exponentiation symbol as `**`. We can't use caret because it's
67
+ // reserved for basic block identifiers If no star is present, it's treated
68
+ // as a polynomial with exponent 1.
70
69
if (succeeded (parser.parseOptionalStar ())) {
71
- // If there's one * there must be two
70
+ // If there's one * there must be two.
72
71
if (failed (parser.parseStar ())) {
73
72
parser.emitError (parser.getCurrentLocation (),
74
73
" exponents must be specified as a double-asterisk `**`" );
0 commit comments