FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/src/lpython/parser/parser_exception.h at main · ekMartian/lpython · GitHub
ekMartian
/
lpython
Public
forked from
lcompilers/lpython
Notifications
You must be signed in to change notification settings
Fork
0
Star
0
Code
Pull requests
0
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Pull requests
Actions
Projects
Security and quality
Insights
Expand file tree
Breadcrumbs
lpython
/
src
/
lpython
/
parser
/
parser_exception.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
49 lines (36 loc) · 1.12 KB
Breadcrumbs
lpython
/
src
/
lpython
/
parser
/
parser_exception.h
Copy path
File metadata and controls
49 lines (36 loc) · 1.12 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#
ifndef
LPYTHON_PARSER_PARSER_EXCEPTION_H
#
define
LPYTHON_PARSER_PARSER_EXCEPTION_H
#
include
<
libasr/exception.h
>
#
include
<
libasr/diagnostics.h
>
namespace
LCompilers
::LPython {
namespace
parser_local
{
//
Local exceptions that are used to terminate the tokenizer.
class
TokenizerError
{
public:
diag::Diagnostic d;
public:
TokenizerError
(
const
std::string &msg,
const
Location &loc)
: d{
diag::Diagnostic
(msg, diag::Level::Error, diag::Stage::Tokenizer, {
diag::Label
(
"
"
, {loc})
})}
{ }
TokenizerError
(
const
diag::Diagnostic &d) : d{d} { }
};
class
ParserError
{
public:
diag::Diagnostic d;
public:
ParserError
(
const
std::string &msg,
const
Location &loc)
: d{
diag::Diagnostic
(msg, diag::Level::Error, diag::Stage::Parser, {
diag::Label
(
"
"
, {loc})
})}
{ }
ParserError
(
const
std::string &msg)
: d{
diag::Diagnostic
(msg, diag::Level::Error, diag::Stage::Parser)}
{ }
};
}
}
#
endif
//
LPYTHON_PARSER_PARSER_EXCEPTION_H
Back
|
FazBrowse Home
|
New Git URL