RomanYankovsky / DelphiAST

Abstract syntax tree builder for Delphi
Mozilla Public License 2.0
271 stars 116 forks source link

bugfix: unit list in project parser must use case-insensitive compare… #265

Closed RomanYankovsky closed 6 years ago

RomanYankovsky commented 6 years ago

… (#264)

also: removed unused unit

Lexer can now handle $IF statements in form

{$IF CompilerVersion operator value}

Lexer can now handle $IF statements in form

{$IF CompilerVersion operator value}

This covers most frequent use-cases of CompilerVersion.

Added support for

{$IF RTLVersion operator value}

If $INCLUDE/$I is found while in the $IF(N)DEF/$IF part which is being skipped (undefined conditional etc), include is ignored.

This speeds up parsing (especially if include file has to be found in a long search path) and makes the parser more compatible with Delphi which ignores $INCLUDE statements inside skipped blocks.

! fixed memory leak in destroy ! fixed include file caching

This reverts commit e32cffd1ac2de6665cf00839b7ef8922f741fc3b.