New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
core: Remove last uses of the tokenizer #1073
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## main #1073 +/- ##
==========================================
- Coverage 86.85% 86.75% -0.11%
==========================================
Files 130 130
Lines 20474 20470 -4
Branches 3095 3098 +3
==========================================
- Hits 17783 17758 -25
- Misses 2182 2204 +22
+ Partials 509 508 -1
☔ View full report in Codecov by Sentry. |
Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
c325ed3
to
21aca15
Compare
@@ -71,37 +71,31 @@ class _GPUAttr(ParametrizedAttribute, Generic[T]): | |||
def parse_parameters(parser: Parser) -> list[Attribute]: | |||
parser.parse_characters( | |||
"<", | |||
f"Expected <. gpu attributes currently have the #gpu<name value> syntax.", | |||
": gpu attributes currently have the #gpu<name value> syntax.", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why is the colon necessary here? Shouldn't that be added on the other side of the string format?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess it's a style choice we can change.
Currently, parser methods with a context_msg
option are printed like this: "error-msg" + context_msg
, like in MLIR.
So, we can have error messages like '<' expected in attribute parameters
for instance, making it a bit more concise and readable I think.
This removes `parse_char`, which can use `parse_characters` instead. `parse_characters` now use a similar error naming scheme than the other methods. --------- Co-authored-by: Sasha Lopoukhine <superlopuh@gmail.com>
This removes
parse_char
, which can useparse_characters
instead.parse_characters
now use a similar error naming scheme than the other methods.