-
Notifications
You must be signed in to change notification settings - Fork 117
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
Suggested fixes for most of the issues I reported #231
base: master
Are you sure you want to change the base?
Conversation
Update from original
Added an explicit anKind attribute containing `type` if there is an explicit type.
Record type params (and other parts of the name explicitly in subnodes. Still record the full name in an attribute.
Store all names in a ntName node with a anName attribute for consistency. A name is not a value, so it should not be stored in a value property.
An except-else has very different semantics from an if-else. It needs a specialized node type.
Both class and object can be declared forward.
Thank you for creating a pull request. It will save a lot of time. I'll review it as soon as possible. |
…es in use by a node
… time TOperators.GetItem uses a for loop to extract the correct OperatorsInfo record. This is inefficient. If you reorder the TSyntaxNodeType enumeration so that the operators are in the same order as OperatorsInfo then we can use a simple in statement.
Methods can be declared forward in the implementation section. Also the semicolon after forward is optional as per Turbo Pascal legacy.
…om SyntaxNodeTypes The cool thing about this fix is that no changes are need to the rest of the code and it runs with the same performance as the old code.
You're welcome. I'm just trying to get AST to parse all code correctly so I can use it as a macro/code rewrite tool. Unfortunately my own version has got quite a few alterations that are out of scope for DelphiAST, so I cloned a fresh version and plugged in the changes there. |
… resident external keyword added. Plus a few other small fixes.
Also included are a few minor optimizations.
Also changes all attribute access to use the attribute property.
…RomanYankovsky#244 automated section
This is esp. evident in the following example: const OperatorsInfo: array [0..2] of TOperatorInfo = ((Typ: ntAddr; AssocType: atRight), (Typ: ntDeref; AssocType: atLeft), (Typ: ntGeneric; AssocType: atRight)); All constants are incorrectly listed as one long list, instead of as separate records.
It can parse arbitrarily complex expressions and also deal with more complex comparisons and floating point numbers.
…mpiler can see them
array of const is a special construct. `const` here is not an identifier.
Added `@@` as a distinct operator.
…ruption of childnode list.
…ug in parameter processing introduced in the original 217 fix
I fixed the conflict, have you had time to look at it yet? |
@RomanYankovsky, will you review the PR already? The suspense is killing me! |
Note that #224 also fixes a slight issue where the
SyntaxNodeNames
got out of sync with theSyntaxNodeTypes
(My bad). Also note that #224 allows you to put the operators anywhere in the list, as long as all operators are kept together.Added all remaining fixes in my local version.
This concludes the list of issues for which I have an easy fix.