9 |
|
|
10 |
// This header defines data types shared between the VM core implementation |
// This header defines data types shared between the VM core implementation |
11 |
// (inside the current source directory) and other parts of the sampler |
// (inside the current source directory) and other parts of the sampler |
12 |
// (located at other source directories). |
// (located at other source directories). It also acts as public API of the |
13 |
|
// Real-Time script engine for other applications. |
14 |
|
|
15 |
#ifndef LS_INSTR_SCRIPT_PARSER_COMMON_H |
#ifndef LS_INSTR_SCRIPT_PARSER_COMMON_H |
16 |
#define LS_INSTR_SCRIPT_PARSER_COMMON_H |
#define LS_INSTR_SCRIPT_PARSER_COMMON_H |
913 |
/** |
/** |
914 |
* Reflects the precise position and span of a specific code block within |
* Reflects the precise position and span of a specific code block within |
915 |
* a script. This is currently only used for the locations of commented |
* a script. This is currently only used for the locations of commented |
916 |
* code blocks due to preprocessor statements. |
* code blocks due to preprocessor statements, and for parser errors and |
917 |
|
* parser warnings. |
918 |
* |
* |
919 |
* @see VMParserContext::preprocessorComments() |
* @see ParserIssue for code locations of parser errors and parser warnings |
920 |
|
* |
921 |
|
* @see VMParserContext::preprocessorComments() for locations of code which |
922 |
|
* have been filtered out by preprocessor statements |
923 |
*/ |
*/ |
924 |
struct CodeBlock { |
struct CodeBlock { |
925 |
int firstLine; ///< The first line number of this code block within the script (indexed with 1 being the very first line). |
int firstLine; ///< The first line number of this code block within the script (indexed with 1 being the very first line). |
936 |
* |
* |
937 |
* @see VMSourceToken for processing syntax highlighting instead. |
* @see VMSourceToken for processing syntax highlighting instead. |
938 |
*/ |
*/ |
939 |
struct ParserIssue { |
struct ParserIssue : CodeBlock { |
940 |
String txt; ///< Human readable explanation text of the parser issue. |
String txt; ///< Human readable explanation text of the parser issue. |
|
int firstLine; ///< The first line number within the script where this issue was encountered (indexed with 1 being the very first line). |
|
|
int lastLine; ///< The last line number within the script where this issue was encountered. |
|
|
int firstColumn; ///< The first column within the script where this issue was encountered (indexed with 1 being the very first column). |
|
|
int lastColumn; ///< The last column within the script where this issue was encountered. |
|
941 |
ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning. |
ParserIssueType_t type; ///< Whether this issue is either a parser error or just a parser warning. |
942 |
|
|
943 |
/** |
/** |