styler (version 1.1.0)

ensure_correct_str_txt: Ensure a correct text of all strings

Description

Make sure text of the tokens STR_CONST is correct and adapt if necessary. We first parse text again and include also non-terminal text. Then, we replace offending text in the terminal expressions with the text of their parents if their line / col position matches and return an error otherwise.

Usage

ensure_correct_str_txt(pd, text)

Arguments

pd

A parse table.

text

The text from which pd was created. Needed for potential reparsing.