Refactoring D as an MSc Project
Brian Schott via Digitalmars-d
digitalmars-d at puremagic.com
Tue Mar 3 15:07:33 PST 2015
On Tuesday, 3 March 2015 at 01:17:33 UTC, Jamie wrote:
> On Monday, 2 March 2015 at 21:54:05 UTC, Brian Schott wrote:
>> On Monday, 2 March 2015 at 21:50:46 UTC, Jamie wrote:
>>> Hello all!
>>>
>>> This is my first post on the forums. I'm interested in
>>> possibly creating a refactoring tool for D for my MSc
>>> dissertation (I notice there is currently no refactoring in
>>> D?). I wanted to ask if this is possible with D's current
>>> state?
>>>
>>> More specifically:
>>> - Can I easily access things such as the AST?
>>
>> This should save you a lot of time:
>> https://github.com/Hackerpilot/libdparse
>
> I've had a look around and it seems promising, however are
> there any usage examples poking around somewhere I could look
> at? Also, does the produced AST have location information?
Not all AST nodes have location information right now. I've
mostly been adding that as I need it for other projects. Any
field of an AST class that has a type "Token" will have line,
column and byte offsets.
These projects use libdparse:
https://github.com/Hackerpilot/DCD
https://github.com/Hackerpilot/Dscanner
https://github.com/Hackerpilot/dfmt
https://github.com/economicmodeling/harbored
More information about the Digitalmars-d
mailing list