-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* disallow trailing characters on keywords; avoid unnecessary attempts I was previously forcing the presence of ' ' after keywords. now we ensure the absence of alpha_num after them. this seems tidier. previously we could encounter weird behavior like `(if 1)` parsing to a function application with variable named `if`. this is because we would backtrack if `if` failed to parse, and end up in the `App` branch. now I avoid backtracking by committing (no `attempt`). in order todo so I had to factor out the common prefix of lam & let ("l"). not sure if there's a better way. * cargo fmt * parse: restrict `Name`: disallow keywords * fix tests & revert `attempt` avoid generating reserved keywords for `Name`, as we now disallow that. removing the `attempt`s caused us to fail on things like `(ifio 1)` which is a valid application of a variable `ifio`. since we were refusing to backtrack out of the If route, we weren't handling it.
- Loading branch information
Showing
5 changed files
with
57 additions
and
29 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
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