Implement source info retrieval API function (#4780)

JerryScript-DCO-1.0-Signed-off-by: Zoltan Herczeg [email protected]
This commit is contained in:
Zoltan Herczeg authored and GitHub committed 2021-09-29 12:34:38 +02:00
1 parent 8b3eb93167
commit 2a82da62ad
7 files changed
+524 -6

No files matched your search

+9 -2
View File
@@ -3743,8 +3743,15 @@ lexer_init_line_info (parser_context_t *context_p) /**< context */
if (options_p != NULL && (options_p->options & JERRY_PARSE_HAS_START))
{
context_p->line = (options_p->start_line > 0) ? options_p->start_line : 1;
context_p->column = (options_p->start_column > 0) ? options_p->start_column : 1;
if (options_p->start_line > 0)
{
context_p->line = options_p->start_line;
}
if (options_p->start_column > 0)
{
context_p->column = options_p->start_column;
}
}
} /* lexer_init_line_info */