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

New API: Pluto.is_single_expression #3134

Merged
merged 1 commit into from
Jan 17, 2025
Merged

New API: Pluto.is_single_expression #3134

merged 1 commit into from
Jan 17, 2025

Conversation

fonsp
Copy link
Owner

@fonsp fonsp commented Jan 14, 2025

To check if a String contains a single expression.

If this function returns false, then Pluto will show a "multiple expressions in one cell" error in the editor.

See tests in the PR files

Try this Pull Request!

Open Julia and type:

julia> import Pkg
julia> Pkg.activate(temp=true)
julia> Pkg.add(url="https://github.com/fonsp/Pluto.jl", rev="is_single_expression")
julia> using Pluto

@contra-bit
Copy link

Thanks, every nice. One step closer to never opening julia code in jupyter again, thanks to the automatic conversions :)

@fonsp fonsp merged commit ae3dfc3 into main Jan 17, 2025
10 of 12 checks passed
@fonsp fonsp deleted the is_single_expression branch January 17, 2025 10:43
fonsp added a commit that referenced this pull request Jan 17, 2025
* Remove frontend AST pattern matching (WIP)

* pkg bubble plugin without lezer template

* uhmmm

* remove log

* write new scope analysis based on TreeCursor and remove old code

* more precise function stuff

* support for loop, fix weird iteration

* Support try catch, fix console group, comments

* Support module, quote, :, do

* New API: Pluto.is_single_expression (#3134)

* Update scopestate_statefield.js

* Fix #3136

* Fix #3136

* Update scopestate_statefield.js

* Fix bracket matching

* Update block_matcher_plugin.js

* Update scopestate_statefield.js

* fix ts errors

* Support scope in generator expressions
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.

2 participants