Skip to content

Remove unused filename parameter from Formatter#4919

Closed
miketheman wants to merge 1 commit intocrystal-lang:masterfrom
miketheman:miketheman/remove-filename-from-formatter
Closed

Remove unused filename parameter from Formatter#4919
miketheman wants to merge 1 commit intocrystal-lang:masterfrom
miketheman:miketheman/remove-filename-from-formatter

Conversation

@miketheman
Copy link
Copy Markdown
Contributor

The Parser inherits #filename from Lexer, and since Formatter only
needs source, it's not used outside of the Command.

Signed-off-by: Mike Fiedler miketheman@gmail.com

The Parser inherits #filename from Lexer, and since Formatter only
needs `source`, it's not used outside of the Command.

Signed-off-by: Mike Fiedler <miketheman@gmail.com>
@asterite
Copy link
Copy Markdown
Member

asterite commented Sep 5, 2017

But the filename is used in case an exception is raised, for example if there's a parsing error.

@miketheman
Copy link
Copy Markdown
Contributor Author

@asterite Thanks for explaining! It wasn't apparent fro looking at the code.
Would it be better to have an inline doc to explain this?

@ysbaddaden
Copy link
Copy Markdown
Collaborator

Closing?

@miketheman miketheman closed this Sep 14, 2017
@asterite
Copy link
Copy Markdown
Member

@miketheman Most of the compiler is undocumented. I think many things should be documented, but since it's in flux I wouldn't recommend doing it now.

@miketheman miketheman deleted the miketheman/remove-filename-from-formatter branch September 16, 2017 14:44
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.

3 participants