diff options
Diffstat (limited to 'src/LuaSL/LuaSL_compile.c')
-rw-r--r-- | src/LuaSL/LuaSL_compile.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/LuaSL/LuaSL_compile.c b/src/LuaSL/LuaSL_compile.c index 9d6834d..ecc61bd 100644 --- a/src/LuaSL/LuaSL_compile.c +++ b/src/LuaSL/LuaSL_compile.c | |||
@@ -105,6 +105,7 @@ LSL_Token LSL_Tokens[] = | |||
105 | {LSL_KEY, ST_NONE, "key", LSL_NONE, outputStringToken}, | 105 | {LSL_KEY, ST_NONE, "key", LSL_NONE, outputStringToken}, |
106 | {LSL_LIST, ST_NONE, "list", LSL_NONE, outputListToken}, | 106 | {LSL_LIST, ST_NONE, "list", LSL_NONE, outputListToken}, |
107 | {LSL_ROTATION, ST_NONE, "rotation", LSL_NONE, outputListToken}, | 107 | {LSL_ROTATION, ST_NONE, "rotation", LSL_NONE, outputListToken}, |
108 | {LSL_MSTRING, ST_NONE, "string", LSL_NONE, outputStringToken}, | ||
108 | {LSL_STRING, ST_NONE, "string", LSL_NONE, outputStringToken}, | 109 | {LSL_STRING, ST_NONE, "string", LSL_NONE, outputStringToken}, |
109 | {LSL_VECTOR, ST_NONE, "vector", LSL_NONE, outputListToken}, | 110 | {LSL_VECTOR, ST_NONE, "vector", LSL_NONE, outputListToken}, |
110 | 111 | ||
@@ -2184,7 +2185,15 @@ static void outputStatementToken(FILE *file, outputMode mode, LSL_Leaf *content) | |||
2184 | static void outputStringToken(FILE *file, outputMode mode, LSL_Leaf *content) | 2185 | static void outputStringToken(FILE *file, outputMode mode, LSL_Leaf *content) |
2185 | { | 2186 | { |
2186 | if (content) | 2187 | if (content) |
2187 | fprintf(file, "%s", content->value.stringValue); // The quotes are part of the string value already. | 2188 | { |
2189 | if (MF_MSTRING & content->flags) | ||
2190 | { | ||
2191 | // TODO - LSL might ignore leading spaces in later lines, but does Lua? | ||
2192 | fprintf(file, "[=[%.*s]=]", (int) strlen(content->value.stringValue) - 2, &content->value.stringValue[1]); | ||
2193 | } | ||
2194 | else | ||
2195 | fprintf(file, "%s", content->value.stringValue); // The quotes are part of the string value already. | ||
2196 | } | ||
2188 | } | 2197 | } |
2189 | 2198 | ||
2190 | boolean compilerSetup(gameGlobals *ourGlobals) | 2199 | boolean compilerSetup(gameGlobals *ourGlobals) |