char-fork/llama.cpp

git clone https://git.t4t.associates/char-fork/llama.cpp

Xuan-Son Nguyencommon : implement new jinja template engine (#18462)c15395f73

char/aliceai-t5-moe
533 B21 linesraw
1#pragma once
2
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 error
14program 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 jinja