-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Previously, functions were implemented with a separate set of types that had their own code paths in the compiler, eval, etc. These changes refactor the function implementation so that functions are implemented as rules with one or more arguments. By representing functions as rules, we can avoid special casing required to support functions, e.g., during parse and compile there are a number of steps that required special casing for functions: - Parser needed separate grammar definitions for functions (which prevented them from being chained or using else) - Compiler needed separate resolver and type checker implementations which was a source of bugs. In some cases, special casing is unavoidable for now (e.g., during eval) however this could be improved in the future. Fixes #471 Fixes #467 Fixes #463
- Loading branch information
Showing
31 changed files
with
2,274 additions
and
2,915 deletions.
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
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
Oops, something went wrong.