Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RakuAST: make redeclarations a typed worry / panic
Until now, with RakUAST, lexical entries that were defined more than once, would fail at the MAST generation stage. Now, they will properly worry / panic at the stage when being parsed. This is achieved by having the .declare-lexical return a Bool that indicates whether the name of the declaration already existed or not. And then add the worry / throw the panic if it did exist already. This does *not* however completely mimic the behaviour of the old grammar, as in the case of a single worry, MAST generation still complains of finding duplicate lexical symbols. So I guess this needs more investigation.
- Loading branch information
Showing
2 changed files
with
18 additions
and
9 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters