-
Notifications
You must be signed in to change notification settings - Fork 656
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 subproperty as new literal type #2308
Adds subproperty as new literal type #2308
Conversation
Is there going to be followup to bubble this further up to the actual parsed
expects
I would think that test case should fail as written and be updated with this change. |
with the last commit, the data is now bubbled up in |
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.
So given that this new token is "greedy" (like, it's made up of smaller tokens that could be recognized on their own) we probably want to extend the test data (can do nested_fields
) to cover a few more things
- multiple nested fields
- nested fields at the end of a profile where the next line is a
[profile]
declaration - nested fields at the end of a file
- nested fields at the end of a file + newlines
LGTM otherwise, fixandship.
@@ -60,7 +60,6 @@ const ( | |||
NoneType = ValueType(iota) | |||
StringType | |||
QuotedStringType | |||
// FUTURE(2226) MapType |
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.
Why no MapType
? I don't fully remember what all uses this, though.
return 0, fmt.Errorf("no sub property") | ||
} | ||
|
||
|
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.
Do you have gofmt
running? It should clean up extra newlines like this.
To support subproperties in the aws config file, it was decided to extend the ini lexer to treat subproperties as literals. Then parse these literals in the config parser.
It was specifically avoided to add this support in the INI parser. This is because the current state of the INI parser: