2021-09-27 14:02:44 -04:00
|
|
|
/*
|
|
|
|
* parser.h --- Seq AST parser.
|
|
|
|
*
|
|
|
|
* (c) Seq project. All rights reserved.
|
|
|
|
* This file is subject to the terms and conditions defined in
|
|
|
|
* file 'LICENSE', which is part of this source code package.
|
|
|
|
*/
|
|
|
|
|
|
|
|
#pragma once
|
|
|
|
|
|
|
|
#include <string>
|
|
|
|
#include <unordered_map>
|
|
|
|
#include <vector>
|
|
|
|
|
|
|
|
#include "sir/sir.h"
|
|
|
|
#include "util/common.h"
|
|
|
|
|
2021-10-04 12:10:59 -05:00
|
|
|
namespace codon {
|
2021-09-27 14:02:44 -04:00
|
|
|
|
2021-10-04 12:10:59 -05:00
|
|
|
codon::ir::Module *parse(const std::string &argv0, const std::string &file,
|
2021-10-04 13:14:16 -04:00
|
|
|
const std::string &code = "", bool isCode = false,
|
|
|
|
int isTest = 0, int startLine = 0,
|
|
|
|
const std::unordered_map<std::string, std::string> &defines =
|
|
|
|
std::unordered_map<std::string, std::string>{});
|
2021-09-27 14:02:44 -04:00
|
|
|
|
|
|
|
void generateDocstr(const std::string &argv0);
|
|
|
|
|
2021-10-04 12:10:59 -05:00
|
|
|
} // namespace codon
|