-
Notifications
You must be signed in to change notification settings - Fork 22
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
Adds sections on modules #353
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great! All my comments are superficial.
Co-authored-by: Zack Slayton <[email protected]>
|
||
### `macro_table` | ||
|
||
Macros are declared after symbols. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a specific reason for this ordering? Food for thought: if symbols were declared after macros, would that make it clearer that the symbols defined in an encoding directive are not yet available for use in the macro definitions in that same encoding directive?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Created #356
Macro names are optional, and improve legibility when using, writing, and debugging macros. | ||
When a name is used, it must be an identifier per Ion’s syntax for symbols. | ||
Macro definitions being added to the macro table must have a unique name. | ||
If a macro is added whose name conflicts with one already present in the table, the implementation must raise an error. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Except for the system macros, which may be shadowed?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
They can only be shadowed in the sense that a system macro make_string
can exist in the system macro table at the same time as a user macro make_string
can exist in any other macro table. However, it is never legal to have two macros given the same name in the same macro table, even if one is a system macro.
Issue #, if available:
Description of changes:
Adds sections for modules in general and the various types of modules.
By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.