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

Новый тип диагностики на основе перебора Symbol tree #1208

Closed
nixel2007 opened this issue May 24, 2020 · 3 comments · Fixed by #1232
Closed
Labels
component/diagnostics Доработка / создание диагностики type/discuss type/enhancement New feature or request

Comments

@nixel2007
Copy link
Member

Некоторые диагностики работают на базе символьного дерева, часто - на базе MethodSymbol и им не нужна информация о дереве разбора. Было бы удобно иметь абстрактную диагностику, в которой были бы методы в духе visitMethodSymbol(MethodSymbol symbol)

@nixel2007 nixel2007 added type/enhancement New feature or request type/discuss component/diagnostics Доработка / создание диагностики labels May 24, 2020
@nixel2007
Copy link
Member Author

NonExportMethodsInApiRegionDiagnostic, MethodSizeDiagnostic и т.п.

@alkoleft
Copy link
Contributor

С точки зрения производительности, ИМХО, лучше предоставить методы геттеры, ExportVariables, NonExport. Или реализовать у *Symbol классов методы проверок, isExport, InRegion - добавит удобства при работе со stream.

@nixel2007
Copy link
Member Author

nixel2007 commented May 29, 2020

Эм... Не знаю, как это может повлиять на производительность, если честно. Конкретно эта задача на классический gof-овский visitor, который должен рекурсивно перебрать все символьное дерево и вызвать visit* в зависимости от типа символа

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
component/diagnostics Доработка / создание диагностики type/discuss type/enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants