I’m trying to implement a new type for my dialect implementation, and one of the things I should do, as stated in the documentation, is to override the parseType
function to handle the parsing of the new types. So, will the parsing function that I define be called during the execution of the parseSourceFile
function (or parseInputFile
, for example)? (Here’s the parseSourceFile call in toy Ch7 llvm-project/mlir/examples/toy/Ch7/toyc.cpp at main · llvm/llvm-project · GitHub)
The parser will dispatch to a dialect parseType
when it sees the prefix !mydialect
.
1 Like