fix: refuse to generate code for imported parsers to avoid duplicate declarations
This commit is contained in:
parent
9f6821d685
commit
73065860f3
1 changed files with 2 additions and 0 deletions
|
|
@ -68,6 +68,8 @@ match e with
|
|||
-- synthesize a new `[combinatorAttr c]`
|
||||
some value ← pure cinfo.value?
|
||||
| throwError $ "don't know how to generate " ++ ctx.varName ++ " for non-definition '" ++ toString e ++ "'";
|
||||
none ← pure $ env.getModuleIdxFor? c
|
||||
| throwError $ "refusing to generate code for imported parser declaration '" ++ c ++ "'; use `@[runParserAttributeHooks]` on its definition instead.";
|
||||
value ← compileParserBody $ preprocessParserBody ctx value;
|
||||
ty ← forallTelescope cinfo.type fun params _ =>
|
||||
params.foldrM (fun param ty => do
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue