-
Notifications
You must be signed in to change notification settings - Fork 743
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix unbalanced parenthesis crash in Common Lisp lexer (#1129)
The Common Lisp lexer attempted to guard against an unmatched closing parenthesis being used by checking whether the stack of states was empty. This misunderstood the way the stack is used. The stack should always have at least one state (the bottom-most :root state). Popping this state will cause an empty stack error to be thrown (as noted in #1102). The correct guard is to check whether the size of the stack is 1. If it is, then we have an unmatched closing parenthesis and should generate an error token. This fixes #1102.
- Loading branch information
Showing
3 changed files
with
12 additions
and
1 deletion.
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
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