mirror of
https://github.com/TorqueGameEngines/Torque3D.git
synced 2026-04-22 21:05:39 +00:00
Console Refactor
This commit is contained in:
parent
626de074cc
commit
89b0c7f73b
89 changed files with 1883 additions and 1553 deletions
49
Engine/source/console/torquescript/parser.h
Normal file
49
Engine/source/console/torquescript/parser.h
Normal file
|
|
@ -0,0 +1,49 @@
|
|||
#ifndef _TORQUESCRIPT_PARSER_H_
|
||||
#define _TORQUESCRIPT_PARSER_H_
|
||||
#include <cstdio>
|
||||
|
||||
#include "platform/types.h"
|
||||
|
||||
const char* CMDGetCurrentFile();
|
||||
S32 CMDGetCurrentLine();
|
||||
S32 CMDparse();
|
||||
void CMDrestart(FILE* in);
|
||||
void CMDSetScanBuffer(const char *sb, const char *fn);
|
||||
|
||||
extern void expandEscape(char *dest, const char *src);
|
||||
extern bool collapseEscape(char *buf);
|
||||
|
||||
class TorqueScriptParser
|
||||
{
|
||||
public:
|
||||
TorqueScriptParser() = default;
|
||||
|
||||
const char* mExtension;
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \brief Function for GetCurrentFile from the lexer
|
||||
//-----------------------------------------------------------------------------
|
||||
const char* getCurrentFile() { return CMDGetCurrentFile(); }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \brief Function for GetCurrentLine from the lexer
|
||||
//-----------------------------------------------------------------------------
|
||||
S32 getCurrentLine() { return CMDGetCurrentLine(); }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \brief Function for Parse from the lexer
|
||||
//-----------------------------------------------------------------------------
|
||||
S32 parse() { return CMDparse(); }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \brief Function for Restart from the lexer
|
||||
//-----------------------------------------------------------------------------
|
||||
void restart(FILE *pInputFile) { CMDrestart(pInputFile); }
|
||||
|
||||
//-----------------------------------------------------------------------------
|
||||
/// \brief Function for SetScanBuffer from the lexer
|
||||
//-----------------------------------------------------------------------------
|
||||
void setScanBuffer(const char* sb, const char* fn) { CMDSetScanBuffer(sb, fn); }
|
||||
};
|
||||
|
||||
#endif
|
||||
Loading…
Add table
Add a link
Reference in a new issue