diff options
Diffstat (limited to 'src/yuescript/yue_parser.cpp')
| -rw-r--r-- | src/yuescript/yue_parser.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/yuescript/yue_parser.cpp b/src/yuescript/yue_parser.cpp index 83aba40..e5337b0 100644 --- a/src/yuescript/yue_parser.cpp +++ b/src/yuescript/yue_parser.cpp | |||
| @@ -1109,6 +1109,10 @@ std::string YueParser::toString(input::iterator begin, input::iterator end) { | |||
| 1109 | return _converter.to_bytes(std::wstring(begin, end)); | 1109 | return _converter.to_bytes(std::wstring(begin, end)); |
| 1110 | } | 1110 | } |
| 1111 | 1111 | ||
| 1112 | bool YueParser::hasAST(std::string_view name) const { | ||
| 1113 | return _rules.find(name) != _rules.end(); | ||
| 1114 | } | ||
| 1115 | |||
| 1112 | YueParser& YueParser::shared() { | 1116 | YueParser& YueParser::shared() { |
| 1113 | thread_local static YueParser parser; | 1117 | thread_local static YueParser parser; |
| 1114 | return parser; | 1118 | return parser; |
