add support for parsing class defs to the string frontend (#17628)
authorMichael Suo <suo@fb.com>
Tue, 12 Mar 2019 02:07:58 +0000 (19:07 -0700)
committerFacebook Github Bot <facebook-github-bot@users.noreply.github.com>
Tue, 12 Mar 2019 02:13:55 +0000 (19:13 -0700)
commit496a3339dc6cd89345aac2f5da841f71fe635a39
treed06d8018706a7977f8f192178ec6aba95b9de7e1
parent64bb86d946b817ee9f9425f6a0cd0a69d4aea39b
add support for parsing class defs to the string frontend (#17628)

Summary:
Pull Request resolved: https://github.com/pytorch/pytorch/pull/17628

This is not hooked up anywhere yet, just adding support.
This shares the same restrictions as the python frontend—namely, that the only exprs allowed right now are method defs.

Reviewed By: shannonzhu

Differential Revision: D14291654

fbshipit-source-id: 7798e5ff412a52ef8803c7bae8f439e50968a73a
test/cpp/jit/gtest.cpp
test/cpp/jit/no-gtest.cpp
test/cpp/jit/test_class_parser.h [new file with mode: 0644]
torch/csrc/jit/script/parser.cpp
torch/csrc/jit/script/parser.h