You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This task is about adding a symbol attribute to include components and quickly parsing and extracting the content corresponding to specific symbols in GDScript files. As we make more advanced learning material, we need to include entire functions or classes more and more. This attribute will help us quickly extract the relevant content from the source files.
It should work like this:
A minimal parser parses definitions and stores the corresponding content in tokens.
When we encounter a symbol attribute in the MDX file, we parse the corresponding GDScript file, check if that symbol exists, and include it in the output.
Currently, we can include anchors, which use comment pairs in the source files. We will use both attributes, but now only one of the two attributes should be used in a given Include component.
Requirements:
Parse symbol attributes in Include components.
Error if both symbol and anchor attributes are used in the same Include component.
Parse and cache a parsed GDScript as a token tree when we encounter a new file.
Create a table of symbols and their corresponding content.
Update documentation for the Include component.
Stretch goals:
Writing symbol.definition or symbol.def in the Include component should include the definition only. E.g. <Include file="my_script.gd" symbol="_ready.definition" /> should include the _ready() function definition only. This is only valid for symbols whose definition is separate from their body.
The text was updated successfully, but these errors were encountered:
This task is about adding a
symbol
attribute to include components and quickly parsing and extracting the content corresponding to specific symbols in GDScript files. As we make more advanced learning material, we need to include entire functions or classes more and more. This attribute will help us quickly extract the relevant content from the source files.It should work like this:
symbol
attribute in the MDX file, we parse the corresponding GDScript file, check if that symbol exists, and include it in the output.Currently, we can include anchors, which use comment pairs in the source files. We will use both attributes, but now only one of the two attributes should be used in a given
Include
component.Requirements:
symbol
attributes inInclude
components.symbol
andanchor
attributes are used in the sameInclude
component.Stretch goals:
symbol.definition
orsymbol.def
in theInclude
component should include the definition only. E.g.<Include file="my_script.gd" symbol="_ready.definition" />
should include the_ready()
function definition only. This is only valid for symbols whose definition is separate from their body.The text was updated successfully, but these errors were encountered: