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

feat: Easily export attributes #60

Merged
merged 5 commits into from
Sep 3, 2022
Merged

feat: Easily export attributes #60

merged 5 commits into from
Sep 3, 2022

Conversation

TekWizely
Copy link
Owner

@TekWizely TekWizely commented Jul 28, 2022

Enables two quick ways to export an attribute:

Export with implied variable name based on attribute name

  • EXPORT .ATTRIBUTE.NAME
    • Implicitly assigns to variable ATTRIBUTE_NAME, ie
    • Removes leading '.'
    • Replaces remaining '.' characters with '_'

Export with explicit variable name

  • EXPORT .ATTRIBUTE.NAME AS VAR_NAME
    • Assigns to variable VAR_NAME

bug: Normalize attribute names in RHS references

TODO:

  • Update Readme

Fixes #57

Enables two quick ways to export an attribute:

Export with implied variable name based on attribute name
- EXPORT .ATTRIBUTE.NAME
  - Implicitly assigns to variable ATTRIBUTE_NAME, ie
  - Removes leading '.'
  - Replaces remaining '.' characters with '_'

Export with explicit variable name
- EXPORT .ATTRIBUTE.NAME AS VAR_NAME
  - Assigns to variable VAR_NAME

bug: Normalize attribute names in RHS references
@TekWizely TekWizely mentioned this pull request Jul 28, 2022
Adds proper AST support for exported attributes
- Enables pre-export support, matching support in variables

chore: Removes ast.ScopeExportList
chore: Adds ast.ScopeVarExport
chore: Adds ast.ScopeAttrExport
chore: Replaces runfile.Exports with var/attr specific support
chore: Replaces name with varName/attrName in places
@TekWizely TekWizely merged commit 5eef048 into master Sep 3, 2022
@TekWizely TekWizely deleted the export_attribute branch September 3, 2022 22:16
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.

Make it easier to export attributes
1 participant