FazBrowse GitHub Viewer
|
Trending
|
URL:
|
Home
Tools:
[Download Repo ZIP]
[View Raw Code]
[Original HTTPS Page]
lpython/src/lpython/parser/parser_stype.h at minus2 · certik/lpython · GitHub
certik
/
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_stype.h
Copy path
More file actions
More file actions
Latest commit
History
History
History
66 lines (47 loc) · 1.46 KB
Breadcrumbs
lpython
/
src
/
lpython
/
parser
/
parser_stype.h
Copy path
File metadata and controls
66 lines (47 loc) · 1.46 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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
#
ifndef
LPYTHON_PARSER_STYPE_H
#
define
LPYTHON_PARSER_STYPE_H
#
include
<
cstring
>
#
include
<
lpython/python_ast.h
>
#
include
<
libasr/location.h
>
#
include
<
libasr/containers.h
>
#
include
<
libasr/bigint.h
>
namespace
LFortran
{
struct
Key_Val
{
LPython::
AST
::
expr_t
* key;
LPython::
AST
::
expr_t
* value;
};
struct
Args
{
LPython::
AST
::
arguments_t
arguments;
};
union
YYSTYPE
{
int64_t
n;
double
f;
Str string;
LPython::
AST
::
ast_t
* ast;
Vec<LPython::
AST
::
ast_t
*> vec_ast;
LPython::
AST
::
alias_t
* alias;
Vec<LPython::
AST
::
alias_t
> vec_alias;
LPython::
AST
::
arg_t
* arg;
Vec<LPython::
AST
::
arg_t
> vec_arg;
Args *args;
Vec<Args> vec_args;
Key_Val *key_val;
Vec<Key_Val*> vec_key_val;
LPython::
AST
::
withitem_t
* withitem;
Vec<LPython::
AST
::
withitem_t
> vec_withitem;
LPython::
AST
::
keyword_t
* keyword;
Vec<LPython::
AST
::
keyword_t
> vec_keyword;
LPython::
AST
::operatorType operator_type;
};
static_assert
(std::is_standard_layout<
YYSTYPE
>::value);
static_assert
(std::is_trivial<
YYSTYPE
>::value);
//
Ensure the YYSTYPE size is equal to Vec<AST::ast_t*>, which is a required member, so
//
YYSTYPE has to be at least as big, but it should not be bigger, otherwise it
//
would reduce performance.
static_assert
(
sizeof
(
YYSTYPE
) ==
sizeof
(Vec<LPython::
AST
::
ast_t
*>));
}
//
namespace LFortran
typedef
struct
LFortran
::Location
YYLTYPE
;
#
define
YYLTYPE_IS_DECLARED
1
#
define
YYLTYPE_IS_TRIVIAL
0
#
endif
//
LPYTHON_PARSER_STYPE_H
Back
|
FazBrowse Home
|
New Git URL