php-internal-docs
8.4.8
Unofficial docs for php/php-src
Loading...
Searching...
No Matches
error.c
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2018 Alexander Borisov
3
*
4
* Author: Alexander Borisov <borisov@lexbor.com>
5
*/
6
7
#include "
lexbor/html/tree/error.h
"
8
9
10
lxb_html_tree_error_t
*
11
lxb_html_tree_error_add
(
lexbor_array_obj_t
*parse_errors,
12
lxb_html_token_t
*token,
lxb_html_tree_error_id_t
id
)
13
{
14
if
(parse_errors ==
NULL
) {
15
return
NULL
;
16
}
17
18
lxb_html_tree_error_t
*entry =
lexbor_array_obj_push
(parse_errors);
19
if
(entry ==
NULL
) {
20
return
NULL
;
21
}
22
23
entry->
id
= id;
24
entry->
line
= token->
line
;
25
entry->
column
= token->
column
;
26
entry->
length
= token->
end
- token->
begin
;
27
28
return
entry;
29
}
lexbor_array_obj_push
void * lexbor_array_obj_push(lexbor_array_obj_t *array)
Definition
array_obj.c:93
NULL
#define NULL
Definition
gdcache.h:45
lxb_html_tree_error_add
lxb_html_tree_error_t * lxb_html_tree_error_add(lexbor_array_obj_t *parse_errors, lxb_html_token_t *token, lxb_html_tree_error_id_t id)
Definition
error.c:11
error.h
lxb_html_tree_error_id_t
lxb_html_tree_error_id_t
Definition
error.h:20
lexbor_array_obj_t
Definition
array_obj.h:17
lxb_html_token_t
Definition
token.h:33
lxb_html_token_t::end
const lxb_char_t * end
Definition
token.h:35
lxb_html_token_t::line
size_t line
Definition
token.h:36
lxb_html_token_t::column
size_t column
Definition
token.h:37
lxb_html_token_t::begin
const lxb_char_t * begin
Definition
token.h:34
lxb_html_tree_error_t
Definition
error.h:98
lxb_html_tree_error_t::length
size_t length
Definition
error.h:102
lxb_html_tree_error_t::line
size_t line
Definition
error.h:100
lxb_html_tree_error_t::id
lxb_html_tree_error_id_t id
Definition
error.h:99
lxb_html_tree_error_t::column
size_t column
Definition
error.h:101
ext
dom
lexbor
lexbor
html
tree
error.c
Generated on Sat Aug 23 2025 01:46:06 for php-internal-docs by
1.13.2