Provides formatters and keywords for the LUA language.
More...
#include <LuaLanguage.h>
Provides formatters and keywords for the LUA language.
◆ CONTEXT
Enumerator |
---|
TO_ELSE_BLOCK | End of if/elseif block and about to start a final else.
|
BEGIN_ELSE | Begin of else block.
|
END_OF_IF | End of if block.
|
END_OF_WHILE | End of while block.
|
END_OF_IF_ELSE_CHAIN | End of an if/elseif/else block.
|
BEGIN_WHILE | Begin of a while block.
|
END_WHILE | End of a while block.
|
◆ DoLoopFooter()
std::string LuaLanguage::DoLoopFooter |
( |
bool |
before_expr | ) |
|
|
virtual |
The Lua parts of a do-loop footer.
- Parameters
-
[in] | before_expr | True to fetch the initial part of the footer, false for the ending part. |
- Returns
- "until (" if before_expr is true, ")" if not.
◆ DoLoopHeader()
const std::string LuaLanguage::DoLoopHeader |
( |
| ) |
|
|
virtual |
The Lua "repeat" keyword.
- Returns
- "repeat".
◆ Else()
const std::string LuaLanguage::Else |
( |
| ) |
|
|
virtual |
The Lua "else" keyword.
- Returns
- "else".
◆ EndBlock()
std::string LuaLanguage::EndBlock |
( |
CONTEXT |
context | ) |
|
|
virtual |
A Lua block ender.
- Parameters
-
[in] | context | The current context. |
- Returns
- "end", unles the current context is {
- See also
- TO_ELSE_BLOCK}, in which case it will return an empty string, because "end" is not needed before an else.
◆ FunctionCallArgumentSeperator()
const std::string LuaLanguage::FunctionCallArgumentSeperator |
( |
| ) |
|
|
virtual |
The Lua argument separator.
- Returns
- ",".
◆ FunctionCallBegin()
const std::string LuaLanguage::FunctionCallBegin |
( |
| ) |
|
|
virtual |
The Lua function argument list opener.
- Returns
- "(".
◆ FunctionCallEnd()
const std::string LuaLanguage::FunctionCallEnd |
( |
| ) |
|
|
virtual |
The Lua function argument list closer.
- Returns
- ")".
◆ Goto()
std::string LuaLanguage::Goto |
( |
uint32 |
target | ) |
|
|
virtual |
A Lua "goto" instruction.
- Parameters
-
[in] | target | A memory address label. |
- Returns
- "goto label_0x<target>X".
◆ If()
std::string LuaLanguage::If |
( |
bool |
before_expr | ) |
|
|
virtual |
The Lua parts of a if control sentence.
- Parameters
-
[in] | before_expr | True to fetch the initial part of the sentence, false for the ending part. |
- Returns
- "if (" if before_expr is true, ") then" if not.
◆ Label()
std::string LuaLanguage::Label |
( |
uint32 |
addr | ) |
|
|
virtual |
Generates a Lua label to use with goto.
- Parameters
-
[in] | addr | Target address label. |
- Returns
- "::label_0x<target>X::"
◆ LineTerminator()
const std::string LuaLanguage::LineTerminator |
( |
| ) |
|
|
virtual |
The Lua line terminator (none).
- Returns
- An empty string.
◆ LoopBreak()
const std::string LuaLanguage::LoopBreak |
( |
| ) |
|
|
virtual |
The Lua "break" keyword.
- Returns
- "break".
◆ LoopContinue()
const std::string LuaLanguage::LoopContinue |
( |
| ) |
|
|
virtual |
The Lua "continue" keyword.
Continue is not implemented in Lua.
- Returns
- A commented string.
◆ StartBlock()
std::string LuaLanguage::StartBlock |
( |
CONTEXT |
context | ) |
|
|
virtual |
The Lua block starter (none).
- Parameters
-
- Returns
- An empty string.
◆ WhileHeader()
std::string LuaLanguage::WhileHeader |
( |
bool |
before_expr | ) |
|
|
virtual |
The Lua parts of a while control sentence.
- Parameters
-
[in] | before_expr | True to fetch the initial part of the sentence, false for the ending part. |
- Returns
- "while (" if before_expr is true, ") do" if not.
The documentation for this class was generated from the following files: