mirror of
https://github.com/litruv/picoGraph.git
synced 2026-07-24 10:46:06 +10:00
Add initial Pico-8 cartridges for testing
- Created test_cart.p8 with basic drawing functionality and a print statement. - Created test_unix.p8 with a simple initialization function.
This commit is contained in:
27
scripts/core/lua/LuaLiteralTable.js
Normal file
27
scripts/core/lua/LuaLiteralTable.js
Normal file
@@ -0,0 +1,27 @@
|
||||
/**
|
||||
* @typedef {import('./LuaLiteralTypes.js').LuaLiteralHandler} LuaLiteralHandler
|
||||
*/
|
||||
|
||||
/** @type {LuaLiteralHandler} */
|
||||
export const LuaLiteralTable = {
|
||||
/**
|
||||
* @param {unknown} value
|
||||
* @returns {string}
|
||||
*/
|
||||
format(value) {
|
||||
if (typeof value === "string") {
|
||||
const trimmed = value.trim();
|
||||
return trimmed.length ? trimmed : "{}";
|
||||
}
|
||||
return "{}";
|
||||
},
|
||||
|
||||
/** @returns {string} */
|
||||
defaultLiteral() {
|
||||
return "{}";
|
||||
},
|
||||
|
||||
spawnableByDefault: false,
|
||||
|
||||
nodeModule: null,
|
||||
};
|
||||
Reference in New Issue
Block a user