CoolFace
Modelpublic

Felipe97/llama-cpp-compiled

sourceHugging Faceupdated 4d agoView on Hugging Face
0likes1.1kdownloads
parser.h22 linesDownload Raw Back to jinja
1#pragma once2 3#include "lexer.h"4#include "runtime.h"5#include "utils.h"6 7#include <string>8#include <stdexcept>9 10namespace jinja {11 12// parse from a list of tokens into an AST (program)13// may throw parser_exception on error14program parse_from_tokens(const lexer_result & lexer_res);15 16struct parser_exception : public std::runtime_error {17    parser_exception(const std::string & msg, const std::string & source, size_t pos)18        : std::runtime_error(fmt_error_with_source("parser", msg, source, pos)) {}19};20 21} // namespace jinja22