Альтернативой Roslyn мог бы быть Eclipse (если уж Java нравится)
https://habrahabr.ru/company/1c/blog/323508/
https://1c-dn.com/blogs/techblog/eclips … ent-tools/
https://projects.eclipse.org/projects/technology.handly
http://www.vogella.com/tutorials/Eclips … ticle.html
JAST defines an API to modify, create, read and delete source code.
org.eclipse.jdt.core.dom package in org.eclipse.jdt.core plug-in.
FAQ What is an AST?
FAQ How do I create and examine an AST?
FAQ How do I implement a DOM for my language?
Automating the embedding of Domain Specific Languages in Eclipse JDT
Abstract Syntax Tree
Хотя сходу я тут не вижу описанного в той работе
"If one thread is modifying an AST, including creating new nodes or cloning existing ones, it is not safe for another thread to read, visit, write, create, or clone any of the nodes on the same AST " (ссылка)
исходник класса:
http://grepcode.com/file/repo1.maven.or … TNode.java
там внутри узлов скрываются "structural properties", но как они пересчиытваются/не пересчитываются и насколько соответствуют "green nodes" - непонятно.
Отредактировано ВежливыйЛис (2017-07-10 16:19:49)