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

Simplify inline-table ABNF definition #557

Merged
merged 1 commit into from Sep 9, 2018

Conversation

swissr
Copy link
Contributor

@swissr swissr commented Aug 20, 2018

Not 100 % sure but I don't see a reason not to use optional directly in the 'inline-table' definition.

@@ -212,14 +212,13 @@ std-table-close = ws %x5D ; ] Right square bracket

;; Inline Table

inline-table = inline-table-open inline-table-keyvals inline-table-close
inline-table = inline-table-open [ inline-table-keyvals ] inline-table-close

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This change means that at least one key/value pair is required - the old way of expressing it allowed for "empty" tables.

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@bitwalker New way allows tables that do not have inline-table-keyvals at all. Is it not the same as "empty tables"?

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, yep, you're right, I was looking at the old definitions of inline-table-* and forgot about the [] around inline-table-keyvals up here.

@pradyunsg
Copy link
Member

Thanks for this PR @swissr! This is definitely an improvement over how it is currently. :)

@pradyunsg pradyunsg merged commit c27865d into toml-lang:master Sep 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants