You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ifparams.onBeforeMetathenparams.onBeforeMeta() end
3546
-
3547
3555
current_anytime_isRunningMeta=true
3548
3556
main_chunk() -- Note: Our caller should clean up current_meta_pathForErrorMessages etc. on error.
3549
3557
current_anytime_isRunningMeta=false
@@ -3644,7 +3652,7 @@ end
3644
3652
3645
3653
localfunctionprocessFileOrString(params, isFile)
3646
3654
ifcurrent_parsingAndMeta_isProcessingthen
3647
-
error("Cannot process recursively.", 3)
3655
+
error("Cannot process recursively.", 3)-- Note: We don't return failure in this case - it's a critical error!
3648
3656
end
3649
3657
3650
3658
-- local startTime = os.clock() -- DEBUG
@@ -3751,7 +3759,7 @@ local pp = {
3751
3759
-- logLevel = levelName -- [Optional] Maximum log level for the @@LOG() macro. Can be "off", "error", "warning", "info", "debug" or "trace". (Default: "trace", which enables all logging)
3752
3760
--
3753
3761
-- onInsert = function( name ) -- [Optional] Called for each @insert"name" instruction. It's expected to return a Lua code string. By default 'name' is a path to a file to be inserted.
3754
-
-- onBeforeMeta = function( ) -- [Optional] Called before the metaprogram runs.
3762
+
-- onBeforeMeta = function( luaString ) -- [Optional] Called before the metaprogram runs. luaString contains the metaprogram.
3755
3763
-- onAfterMeta = function( luaString ) -- [Optional] Here you can modify and return the Lua code before it's written to 'pathOut'.
3756
3764
-- onError = function( error ) -- [Optional] You can use this to get traceback information. 'error' is the same value as what is returned from processFile().
3757
3765
--
@@ -3784,7 +3792,7 @@ local pp = {
3784
3792
-- logLevel = levelName -- [Optional] Maximum log level for the @@LOG() macro. Can be "off", "error", "warning", "info", "debug" or "trace". (Default: "trace", which enables all logging)
3785
3793
--
3786
3794
-- onInsert = function( name ) -- [Optional] Called for each @insert"name" instruction. It's expected to return a Lua code string. By default 'name' is a path to a file to be inserted.
3787
-
-- onBeforeMeta = function( ) -- [Optional] Called before the metaprogram runs.
3795
+
-- onBeforeMeta = function( luaString ) -- [Optional] Called before the metaprogram runs. luaString contains the metaprogram.
3788
3796
-- onError = function( error ) -- [Optional] You can use this to get traceback information. 'error' is the same value as the second returned value from processString().
0 commit comments