42 lines
1.2 KiB
C++
42 lines
1.2 KiB
C++
#pragma once
|
|
|
|
#include "dtcore/inc/dtdefinitions.h"
|
|
#include "dtcore/inc/dtscriptdescriptor.h"
|
|
|
|
namespace dt
|
|
{
|
|
|
|
class ScriptStatement;
|
|
class ScriptStatementScanner;
|
|
class ScriptStatementDescriptor;
|
|
class TestDescriptor;
|
|
|
|
class ScriptParserErrorInterface
|
|
{
|
|
public:
|
|
DT_CORE_DLL_ENTRY virtual void ReportScriptParserFailStatement(const ScriptStatementScanner& scanner,
|
|
const String& msg,
|
|
const String& extended,
|
|
SizeT offset,
|
|
const Strings& suggestions = Strings()) const = 0;
|
|
DT_CORE_DLL_ENTRY virtual void ReportScriptParserFailStatementDescriptor(const ScriptStatementDescriptor* statementDescriptor,
|
|
const ScriptStatementScanner& scanner,
|
|
const String& msg,
|
|
SizeT offset) const = 0;
|
|
};
|
|
|
|
class ScriptParser
|
|
{
|
|
public:
|
|
DT_CORE_DLL_ENTRY static bool Parse(const ScriptDescriptor& script,
|
|
const Map<String, ScriptDescriptor>& testFunctions,
|
|
const Strings& blockedStatements,
|
|
AgentIndex agentIndex,
|
|
int agentCount,
|
|
const TestDescriptor* testDescriptor,
|
|
const ScriptParserErrorInterface* errorInterface,
|
|
ScriptStatement** out);
|
|
};
|
|
|
|
}
|
|
|