1
0
Fork 0
mirror of https://github.com/ton-blockchain/ton synced 2025-03-09 15:40:10 +00:00

updated vm

- updated func/fift
- additional checks in block validator
- docs
- tunnel prototype in ADNL
This commit is contained in:
ton 2020-03-11 14:19:31 +04:00
parent ba76f1404e
commit 54c7a4dcc3
50 changed files with 972 additions and 300 deletions

View file

@ -1288,7 +1288,9 @@ void parse_func_def(Lexer& lex) {
sym::close_scope(lex);
}
bool parse_source(std::istream* is, const src::FileDescr* fdescr) {
std::vector<const src::FileDescr*> source_fdescr;
bool parse_source(std::istream* is, src::FileDescr* fdescr) {
src::SourceReader reader{is, fdescr};
Lexer lex{reader, true, ";,()[] ~."};
while (lex.tp() != _Eof) {
@ -1306,6 +1308,7 @@ bool parse_source_file(const char* filename) {
throw src::Fatal{"source file name is an empty string"};
}
src::FileDescr* cur_source = new src::FileDescr{filename};
source_fdescr.push_back(cur_source);
std::ifstream ifs{filename};
if (ifs.fail()) {
throw src::Fatal{std::string{"cannot open source file `"} + filename + "`"};
@ -1314,7 +1317,9 @@ bool parse_source_file(const char* filename) {
}
bool parse_source_stdin() {
return parse_source(&std::cin, new src::FileDescr{"stdin", true});
src::FileDescr* cur_source = new src::FileDescr{"stdin", true};
source_fdescr.push_back(cur_source);
return parse_source(&std::cin, cur_source);
}
} // namespace funC