mirror of
https://github.com/carbon-language/carbon-lang.git
synced 2026-09-27 16:10:10 +01:00
[executable semantics] Minimal cxx parser (#363)
Makes a minimal transition to using C++ in the parser.
This commit is contained in:
@@ -7,6 +7,7 @@
|
||||
#include <iostream>
|
||||
|
||||
#include "executable_semantics/syntax/parse_and_lex_context.h"
|
||||
#include "executable_semantics/syntax/parser.h"
|
||||
#include "executable_semantics/tracing_flag.h"
|
||||
|
||||
extern FILE* yyin;
|
||||
@@ -28,7 +29,7 @@ auto parse(const std::string& inputFileName)
|
||||
std::optional<AST> parsedInput = std::nullopt;
|
||||
ParseAndLexContext context(inputFileName);
|
||||
|
||||
auto syntaxErrorCode = yyparse(parsedInput, context);
|
||||
auto syntaxErrorCode = yy::parser(parsedInput, context)();
|
||||
if (syntaxErrorCode != 0) {
|
||||
return syntaxErrorCode;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user