Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bypass checks which disable Fennel friendly compiler errors. #2140

Merged
merged 1 commit into from
Feb 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion src/api/fennel.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,9 +34,10 @@
#define FENNEL_CODE(...) #__VA_ARGS__

static const char* execute_fennel_src = FENNEL_CODE(
io = { read = true }
local fennel = require("fennel")
debug.traceback = fennel.traceback
local opts = {filename="game", allowedGlobals = false}
local opts = {allowedGlobals = false, ["error-pinpoint"]={">>", "<<"}}
local src = ...
if(src:find("\n;; strict: true")) then opts.allowedGlobals = nil end
local ok, msg = pcall(fennel.eval, src, opts)
Expand Down