2016-01-10 13:44:22 -08:00
|
|
|
#ifndef COMPILER_GRAMMAR_JSON_H_
|
|
|
|
|
#define COMPILER_GRAMMAR_JSON_H_
|
|
|
|
|
|
|
|
|
|
#include <string>
|
2017-07-11 21:17:27 -07:00
|
|
|
#include <unordered_set>
|
2016-01-10 13:44:22 -08:00
|
|
|
#include "tree_sitter/compiler.h"
|
2016-01-10 20:04:41 -08:00
|
|
|
#include "compiler/grammar.h"
|
2016-01-10 13:44:22 -08:00
|
|
|
|
|
|
|
|
namespace tree_sitter {
|
|
|
|
|
|
|
|
|
|
struct ParseGrammarResult {
|
|
|
|
|
std::string name;
|
2017-03-17 12:52:01 -07:00
|
|
|
InputGrammar grammar;
|
2016-01-10 13:44:22 -08:00
|
|
|
std::string error_message;
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
ParseGrammarResult parse_grammar(const std::string &);
|
|
|
|
|
|
|
|
|
|
} // namespace tree_sitter
|
|
|
|
|
|
|
|
|
|
#endif // COMPILER_GRAMMAR_JSON_H_
|