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
The fix:
function TPasSyntaxTreeBuilder.Run(SourceStream: TStream): TSyntaxNode; begin Result:= nil; try FStack.Clear; try self.OnMessage := ParserMessage; inherited Run('', SourceStream); finally Result:= FStack.Peek; FStack.Pop; end; except on E: EParserException do raise ESyntaxTreeException.Create(E.Line, E.Col, Lexer.FileName, E.Message, Result); on E: ESyntaxError do raise ESyntaxTreeException.Create(E.PosXY.X, E.PosXY.Y, Lexer.FileName, E.Message, Result); else FreeAndNil(Result); raise; end; Assert(FStack.Count = 0); end; procedure TPasSyntaxTreeBuilder.LibraryFile; begin //Assert(FStack.Peek.ParentNode = nil); FStack.Push(TSyntaxNode.Create(ntLibary)); AssignLexerPositionToNode(Lexer, FStack.Peek); inherited; //Stack.pop is done in `Run` end; procedure TPasSyntaxTreeBuilder.ProgramFile; begin //Assert(FStack.Peek.ParentNode = nil); FStack.Push(TSyntaxNode.Create(ntProgram)); AssignLexerPositionToNode(Lexer, FStack.Peek); inherited; //Stack.pop is done in `Run` end; procedure TPasSyntaxTreeBuilder.PackageFile; begin //Assert(FStack.Peek.ParentNode = nil); FStack.Push(TSyntaxNode.Create(ntPackage)); AssignLexerPositionToNode(Lexer, FStack.Peek); inherited; //Stack.pop is done in `Run` end; procedure TPasSyntaxTreeBuilder.UnitFile; begin //Assert(FStack.Peek.ParentNode = nil); FStack.Push(TSyntaxNode.Create(ntUnit)); AssignLexerPositionToNode(Lexer, FStack.Peek); inherited; //Stack.pop is done in `Run` end;
The text was updated successfully, but these errors were encountered:
RomanYankovsky#251 Also parse programs, libs and packages
7ef300f
No branches or pull requests
The fix:
The text was updated successfully, but these errors were encountered: