satyr
0.43
Loading...
Searching...
No Matches
include
js
js/frame.h
Go to the documentation of this file.
1
/*
2
js_frame.h
3
4
Copyright (C) 2016 ABRT Team
5
Copyright (C) 2016 Red Hat, Inc.
6
7
This program is free software; you can redistribute it and/or modify
8
it under the terms of the GNU General Public License as published by
9
the Free Software Foundation; either version 2 of the License, or
10
(at your option) any later version.
11
12
This program is distributed in the hope that it will be useful,
13
but WITHOUT ANY WARRANTY; without even the implied warranty of
14
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15
GNU General Public License for more details.
16
17
You should have received a copy of the GNU General Public License along
18
with this program; if not, write to the Free Software Foundation, Inc.,
19
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
20
*/
21
#ifndef SATYR_JS_FRAME_H
22
#define SATYR_JS_FRAME_H
23
28
29
#ifdef __cplusplus
30
extern
"C"
{
31
#endif
32
33
#include "
../report_type.h
"
34
#include <json.h>
35
#include <stdbool.h>
36
#include <stdint.h>
37
#include <glib.h>
38
39
struct
sr_location
;
40
41
struct
sr_js_frame
42
{
43
enum
sr_report_type type;
44
45
char
*file_name;
46
47
uint32_t file_line;
48
49
uint32_t line_column;
50
51
char
*function_name;
52
53
struct
sr_js_frame
*next;
54
};
55
56
struct
sr_js_frame
*
57
sr_js_frame_new(
void
);
58
59
void
60
sr_js_frame_init(
struct
sr_js_frame
*frame);
61
62
void
63
sr_js_frame_free(
struct
sr_js_frame
*frame);
64
65
struct
sr_js_frame
*
66
sr_js_frame_dup(
struct
sr_js_frame
*frame,
bool
siblings);
67
68
int
69
sr_js_frame_cmp(
struct
sr_js_frame
*frame1,
struct
sr_js_frame
*frame2);
70
71
int
72
sr_js_frame_cmp_distance(
struct
sr_js_frame
*frame1,
73
struct
sr_js_frame
*frame2);
74
75
struct
sr_js_frame
*
76
sr_js_frame_append(
struct
sr_js_frame
*dest,
77
struct
sr_js_frame
*item);
78
79
struct
sr_js_frame
*
80
sr_js_frame_parse(
const
char
**input,
struct
sr_location
*location);
81
82
struct
sr_js_frame
*
83
sr_js_frame_parse_v8(
const
char
**input,
struct
sr_location
*location);
84
85
char
*
86
sr_js_frame_to_json(
struct
sr_js_frame
*frame);
87
88
struct
sr_js_frame
*
89
sr_js_frame_from_json(json_object *root,
char
**error_message);
90
91
void
92
sr_js_frame_append_to_str(
struct
sr_js_frame
*frame, GString *dest);
93
94
#ifdef __cplusplus
95
}
96
#endif
97
98
#endif
report_type.h
Report type.
sr_js_frame
Definition
js/frame.h:42
sr_location
A location of a parser in the input stream.
Definition
location.h:43
Generated by
1.14.0