Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(grit): implement Grit built-ins #3987

Merged
merged 1 commit into from
Sep 19, 2024
Merged

Conversation

arendjr
Copy link
Contributor

@arendjr arendjr commented Sep 19, 2024

Summary

This implements all the Grit built-ins: https://docs.grit.io/language/functions#built-in-functions

Only exception for now is the log() function, which gets a bit of special treatment in the Grit engine.

Note that support for built-in functions will be important for us, as we will want to have a built-in diagnostic() function to allow for the creation of custom linter plugins.

Test Plan

Added test case. Still too low on coverage, but more is coming.

@arendjr arendjr requested a review from a team September 19, 2024 10:32
@arendjr arendjr merged commit 3815905 into biomejs:main Sep 19, 2024
11 checks passed
Copy link

codspeed-hq bot commented Sep 19, 2024

CodSpeed Performance Report

Merging #3987 will improve performances by 7.16%

Comparing arendjr:grit-built-ins (d5a75ba) with main (00760d4)

Summary

⚡ 1 improvements
✅ 106 untouched benchmarks

Benchmarks breakdown

Benchmark main arendjr:grit-built-ins Change
router_17129688031671448157.ts[cached] 2.2 ms 2 ms +7.16%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant