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
8
9
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}
void * lexbor_array_obj_push(lexbor_array_obj_t *array)
Definition array_obj.c:93
#define NULL
Definition gdcache.h:45
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
lxb_html_tree_error_id_t
Definition error.h:20
const lxb_char_t * end
Definition token.h:35
size_t line
Definition token.h:36
size_t column
Definition token.h:37
const lxb_char_t * begin
Definition token.h:34
lxb_html_tree_error_id_t id
Definition error.h:99