We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For now we should simply record any compiler directives. In future we should have some parsing for the directives.
The fix:
procedure TPasSyntaxTreeBuilder.CompilerDirective; begin FStack.AddValuedChild(ntCompilerDirective, Lexer.Token); inherited; end; procedure TmwSimplePasPar.CompilerDirective; begin Expected(ptCompDirect); end; procedure TmwSimplePasPar.HandlePtCompDirect(Sender: TmwBasePasLex); begin if (not Lexer.IsJunk) then CompilerDirective; end;
An attempt at parsing compiler directives:
procedure TPasSyntaxTreeBuilder.CompilerDirective; var Directive: string; Node: TSyntaxNode; Part2: integer; begin Directive:= Uppercase(Lexer.Token); Node:= FStack.AddValuedChild(ntCompilerDirective, Directive); //Parse the directive if (Directive.StartsWith('(*$')) then begin Delete(Directive, 1, 3); StringReplace(Directive,'*)','}',[]); end else begin Delete(Directive, 1, 2); end; Part2:= 1; while not(Directive[Part2] in [' ', '+', '-', '}']) do begin Inc(Part2); end; Node.Attribute[anType]:= LeftStr(Directive, Part2-1); Delete(Directive, 1, Part2-1); Delete(Directive, Length(Directive), 1); Directive:= Trim(Directive); Node.Attribute[anKind]:= Directive; inherited; end;
The text was updated successfully, but these errors were encountered:
RomanYankovsky#252 record compiler directive
468a2be
RomanYankovsky#252 do not register compiler directives, unless the co…
e89593a
…mpiler can see them
RomanYankovsky#253 support absolute and RomanYankovsky#252 part2
absolute
23637da
RomanYankovsky#252 always put compiler directive underneigh the root
0f89a62
No branches or pull requests
For now we should simply record any compiler directives.
In future we should have some parsing for the directives.
The fix:
An attempt at parsing compiler directives:
The text was updated successfully, but these errors were encountered: