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

Rework Rakugo/Parser, parse_scripts(folder_path:String) #84

Open
theludovyc opened this issue May 22, 2022 · 5 comments · Fixed by #118
Open

Rework Rakugo/Parser, parse_scripts(folder_path:String) #84

theludovyc opened this issue May 22, 2022 · 5 comments · Fixed by #118
Labels
majorChange Add this pr to changelog and should describe it
Milestone

Comments

@theludovyc
Copy link
Collaborator

Currently if you want to parse script, you use : func parse_script(file_name:String)
It's parse a .rk file and execute it.

In Parser class, parse and execute are already split but user "can't" access it.

I propose to add or update funcs.

parse_script(file_path:String) <= parse a file and store result in dictionary (like a cache). Key it's fileName without extension.

parse_scripts(folder_path:String) <= parse all rk files in folder at path and store them.

execute_script(file_name:String) <= execute script already stored.

This also sets the stage for jumping between scripts.

@Jeremi360
Copy link
Contributor

Jeremi360 commented May 22, 2022

parse_script(file_path:String) <= parse a file and store result in dictionary (like a cache). Key it's fileName without extension.

I love ❤️ this idea of pseudo-compilation, we can save it to files so build game will be faster.

parse_scripts(folder_path:String) <= parse all rk files in folder at path and store them.

Maybe we can use it with tool mode, so it parses all scripts before launching game.
And if we save this cache to files, then we can recompile only changed scripts

This also sets the stage for jumping between scripts.

Yes, 🎆

@theludovyc
Copy link
Collaborator Author

Maybe we can use it with tool mode, so it parses all scripts before launching game.
And if we save this cache to files, then we can recompile only changed scripts

Keep it in mind :)

@theludovyc
Copy link
Collaborator Author

Do #92 before :)

@Jeremi360
Copy link
Contributor

reopen as mentioned in #118

@Jeremi360 Jeremi360 reopened this Jun 14, 2022
@theludovyc theludovyc changed the title Rework Rakugo/Parser, parse script Rework Rakugo/Parser, parse_scripts(folder_path:String) Jun 18, 2022
@theludovyc
Copy link
Collaborator Author

parse_script(file_path:String) done

execute_script(file_name:String) done

parse_scripts(folder_path:String) <= parse all rk files in folder at path and store them.

@theludovyc theludovyc added the majorChange Add this pr to changelog and should describe it label Jun 26, 2022
@theludovyc theludovyc added this to the 2.1.3 milestone Oct 29, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
majorChange Add this pr to changelog and should describe it
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants