Skip to content

Add import statements#110

Draft
nicopap wants to merge 6 commits intomainfrom
imports
Draft

Add import statements#110
nicopap wants to merge 6 commits intomainfrom
imports

Conversation

@nicopap
Copy link
Copy Markdown
Owner

@nicopap nicopap commented Nov 10, 2023

  • Add publicity modifier to templates, you can mark them as pub
  • The root statement is now optional
  • Add a use statement to import templates from other files
  • Dependencies are properly handled, so that when you modify a template from any file, all scenes that depend on this template get updated.
  • Closes Chirp use statement #73

Future:

  • Add a base library of templates that can be imported anywhere

We can now use bevy-ui-navigation 0.33 with bevy 0.12, and the chirpunk
example works again.
I settled on an import syntax. It is markedly different from the draft
one. So we needed to change the AST and parser to account for those
changes.
Of course it's broken right now.
- Now templates with a pub prefix are collected in the pub_templates Ast
  struct field
- Now, when parsing, the result may either be a scene or a template
  library.
- Template libraries are mutually exclusive with scene files.
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.

Chirp use statement

1 participant