summaryrefslogtreecommitdiff
path: root/src/hir/from_ast.hpp
blob: 3eeaaa48ac919ffa500879bd6e7aeb231cfcbae6 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
/*
 * MRustC - Rust Compiler
 * - By John Hodge (Mutabah/thePowersGang)
 *
 * hir/from_ast.hpp
 * - Shared code definitions for constructing the HIR from AST
 */
#pragma once

#include <hir/expr_ptr.hpp>

extern ::HIR::ExprPtr LowerHIR_ExprNode(const ::AST::ExprNode& e);
extern ::HIR::Path LowerHIR_Path(const Span& sp, const ::AST::Path& path);
extern ::HIR::GenericPath   LowerHIR_GenericPath(const Span& sp, const ::AST::Path& path, bool allow_assoc=false);
extern ::HIR::SimplePath    LowerHIR_SimplePath(const Span& sp, const ::AST::Path& path, bool allow_final_generic = false);
extern ::HIR::TypeRef LowerHIR_Type(const ::TypeRef& ty);
extern ::HIR::Pattern LowerHIR_Pattern(const ::AST::Pattern& pat);

extern RcString g_core_crate;
extern ::HIR::Crate*   g_crate_ptr;