mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-07 12:21:27 +01:00
Summary: This diff is reverting D34455360 (61d6c43864) D34455360 (61d6c43864) is making the following tests to fail and this revert diff is either the revert of the blame diff or the revert of the stack of diffs that need to be reverted to revert the blame diff Tests affected: - https://www.internalfb.com/intern/test/562950004334605/ Multisect link: https://www.internalfb.com/intern/testinfra/multisect/756170 Test Plan: NA Reviewed By: zhxchen17 Differential Revision: D34596156 fbshipit-source-id: a465bca0094db3caf6130c80f1ed49eea981359b (cherry picked from commit ef5e5578c64ce9827570757fb016aafa9c782c6a)
34 lines
678 B
C++
34 lines
678 B
C++
#pragma once
|
|
#include <torch/csrc/Export.h>
|
|
#include <torch/csrc/jit/frontend/tree.h>
|
|
#include <torch/csrc/jit/frontend/tree_views.h>
|
|
#include <memory>
|
|
|
|
namespace torch {
|
|
namespace jit {
|
|
|
|
struct Decl;
|
|
struct ParserImpl;
|
|
struct Lexer;
|
|
|
|
TORCH_API Decl mergeTypesFromTypeComment(
|
|
const Decl& decl,
|
|
const Decl& type_annotation_decl,
|
|
bool is_method);
|
|
|
|
struct TORCH_API Parser {
|
|
explicit Parser(const std::shared_ptr<SourceView>& src);
|
|
TreeRef parseFunction(bool is_method);
|
|
TreeRef parseClass();
|
|
Decl parseTypeComment();
|
|
Expr parseExp();
|
|
Lexer& lexer();
|
|
~Parser();
|
|
|
|
private:
|
|
std::unique_ptr<ParserImpl> pImpl;
|
|
};
|
|
|
|
} // namespace jit
|
|
} // namespace torch
|