quantified-uncertainty / squiggle

An estimation language
https://squiggle-language.com
MIT License
145 stars 22 forks source link

Remove DecoratedStatement, store decorators as a flat list in statement nodes #3314

Closed berekuk closed 2 weeks ago

berekuk commented 2 weeks ago

This is done on top of #3312. It fixes an annoying workaround in syntax highlighting there, as well as simplifies some other things.

The basic idea is the following: previously, we parsed @hide @name("foo") x = 5 as DecoratedStatement decorator (DecoratedStatement decorator (LetStatement x 5)). Now we store it as (LetStatement x 5 [decorator list]).

The benefits:

There are some minor user-facing consequences from this:

vercel[bot] commented 2 weeks ago

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
quri-hub ✅ Ready (Inspect) Visit Preview Jun 12, 2024 1:59am
quri-ui ✅ Ready (Inspect) Visit Preview Jun 12, 2024 1:59am
squiggle-components ✅ Ready (Inspect) Visit Preview Jun 12, 2024 1:59am
squiggle-website ✅ Ready (Inspect) Visit Preview Jun 12, 2024 1:59am
changeset-bot[bot] commented 2 weeks ago

⚠️ No Changeset found

Latest commit: f5aea2c596e6a5a490365715a2a60cd59aa141bf

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR