Closed PeterPanino closed 4 years ago
Actually, comments are parsed. Check TPasSyntaxTreeBuilder.Comments
right after parsing. There is a list of all comments in unit.
How can I extract the comment STRINGS from TPasSyntaxTreeBuilder.Comments?
In ParserDemo, Compiler error says: E2233 Property 'Comments' inaccessible here
I have updated ParserDemo, take a look.
Roman, thank you very much!
What would you suggest as the FASTEST parser for the XML? For example, to get a list of all strings in the unit?
I have added a Strings
property to TPasSyntaxTreeBuilder
. In this way, I can get all the strings in the unit easily inside a single string. What do you think about the implementation? Is it correct?
DelphiAST.zip
I have now also added a Numbers
property to TPasSyntaxTreeBuilder
. In this way, I can get all the numbers in the unit easily inside a single string. What do you think about the implementation? Is it correct?
DelphiAST 11.12.2019 16.08.zip
Looks correct.
I'm just curious, why do you need all strings and numbers?
I plan to create a semantic database of Delphi source files.
See also the issue of missing end-position information in comment nodes. (issue #294)
Ok, this one is resolved.
I need a list of all the comments in the unit. Unfortunately, comments currently are not parsed.