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

Code formatting fails on pipe + method #3192

Open
OAGr opened this issue Apr 18, 2024 · 1 comment
Open

Code formatting fails on pipe + method #3192

OAGr opened this issue Apr 18, 2024 · 1 comment
Labels
Language Regarding Squiggle language semantics, distributions and function registry Parser Lexical and syntactic grammar and its implementation Prettier

Comments

@OAGr
Copy link
Contributor

OAGr commented Apr 18, 2024

Description of suggestion or shortcoming:

xs = (foobar -> Danger.json).pointSet.continuous.xyShape.xs

->

xs = foobar -> Danger.json.pointSet.continuous.xyShape.xs

A better example:

foo = {a: {b: {c: 3}}}

xs = (foo -> {|f| f.a}).b
@OAGr OAGr added Language Regarding Squiggle language semantics, distributions and function registry Parser Lexical and syntactic grammar and its implementation Prettier labels Apr 18, 2024
@OAGr
Copy link
Contributor Author

OAGr commented Apr 18, 2024

On that note, it could be neat to force-test the formatter, by using GPT4 to create a bunch of valid Squiggle programs, then making sure that all have the same AST after being formatted.

This error is fairly scary.

(Also, I agree about wanting to have a check for this, and not formatting if that happens)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Language Regarding Squiggle language semantics, distributions and function registry Parser Lexical and syntactic grammar and its implementation Prettier
Projects
Status: 🆕 To prioritize
Development

No branches or pull requests

1 participant