You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
procedureTPasSyntaxTreeBuilder.ArrayOfConst;
begin//do not fill the name attribute. const is a keyword, not a type.//note that the `anType` attribute is empty.
FStack.Push(ntType).Attribute[anKind]:= AttributeValues[atConst];
tryinherited;
finally
FStack.Pop;
end;
end;
procedureTmwSimplePasPar.ArrayType;
begin
Expected(ptArray);
ArrayBounds;
Expected(ptOf);
ArraySubType;
end;
procedureTmwSimplePasPar.ArrayOfConst;
begin
Expected(ptConst);
end;
procedureTmwSimplePasPar.ArraySubType;
begincase TokenID of
ptConst: ArrayOfConst;
else TypeKind;
end;
end;
The text was updated successfully, but these errors were encountered:
JBontes
pushed a commit
to JBontes/DelphiAST
that referenced
this issue
Oct 17, 2017
The following code:
Gets parsed as:
The
const
keyword is incorrectly tagged as an identifier. It is not.array of const
is a special construct that should be treated specially.See: http://www.dragonkiller.nl/Delphi/delphi2009.html#ArraySubType
I propose the following changes:
The text was updated successfully, but these errors were encountered: