sammine-lang
Loading...
Searching...
No Matches
Parser.h File Reference

Defines Parser, which consumes tokens and constructs the AST. More...

#include "ast/Ast.h"
#include "ast/AstDecl.h"
#include "lex/Token.h"
#include "util/Utilities.h"
#include <map>
#include <memory>
#include <optional>
#include <utility>
Include dependency graph for Parser.h:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

struct  sammine_lang::ParsedQualifiedName
struct  sammine_lang::ParseResult< T >
class  sammine_lang::Parser

Macros

#define PARSER_UNREACHABLE()
#define REQUIRE(var, tokType, msg, loc, ...)

Enumerations

enum  ParserError { SUCCESS , FAILED , NONCOMMITTED }

Detailed Description

Defines Parser, which consumes tokens and constructs the AST.

Macro Definition Documentation

◆ PARSER_UNREACHABLE

#define PARSER_UNREACHABLE ( )
Value:
do { \
sammine_util::abort("Unreachable"); \
std::unreachable(); \
} while (0)

◆ REQUIRE

#define REQUIRE ( var,
tokType,
msg,
loc,
... )
Value:
auto var = expect(tokType); \
if (!(var)) { \
imm_error(msg, loc); \
return __VA_ARGS__; \
}