Starting to checkcode
This commit is contained in:
parent
1d6918d927
commit
016f57ef1c
|
@ -6577,6 +6577,9 @@ lit.status = true
|
|||
-- Grammars
|
||||
function lit.g(name)
|
||||
|
||||
-- Variable for grammars collection
|
||||
local grammars = {}
|
||||
|
||||
-- Lexical elements
|
||||
local newline = lpeg.P"\r"^-1 * lpeg.P"\n"
|
||||
local space = lpeg.S" \t"
|
||||
|
@ -6586,20 +6589,24 @@ function lit.g(name)
|
|||
local yamlheader = space^0 * lpeg.P"---" * space^0 * newline
|
||||
local yamlfooter = space^0 * lpeg.P"..." * space^0 * newline^-1
|
||||
local yamlbody = -yamlfooter * any^0 * newline
|
||||
-- Still not used
|
||||
local id = lpeg.R("az", "AZ") * lpeg.R("az", "AZ", "09")^0
|
||||
local ref = lpeg.P"#" * id
|
||||
local ref = -lpeg.B"\\" * lpeg.P"#" * lpeg.C(id)
|
||||
local notref = (1 - ref)^0
|
||||
|
||||
local grammars = {
|
||||
-- Block grammar
|
||||
["block"] = lpeg.P {
|
||||
"Block";
|
||||
Block = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
},
|
||||
-- Declaration grammar
|
||||
grammars["declaration"] = lpeg.P {
|
||||
"Declaration";
|
||||
Declaration = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
}
|
||||
|
||||
-- References grammar
|
||||
grammars["references"] = notref * lpeg.P {
|
||||
"References";
|
||||
References = lpeg.Ct((ref * notref)^0);
|
||||
} * -1
|
||||
|
||||
return grammars[name]
|
||||
end
|
||||
|
||||
|
@ -6684,7 +6691,7 @@ end
|
|||
-- Examinates (parses and evaluates) document
|
||||
function lit.exam(doc)
|
||||
|
||||
-- Evaluates code block
|
||||
-- Evaluates code declaration
|
||||
-- Evals Lisp code
|
||||
--[[
|
||||
local function eval(code)
|
||||
|
@ -6702,10 +6709,10 @@ function lit.exam(doc)
|
|||
end
|
||||
]]--
|
||||
|
||||
-- Parses code block
|
||||
-- Parses code declaration
|
||||
local function parse(codeblock)
|
||||
|
||||
-- Checks code block
|
||||
-- Checks code declarations
|
||||
local function check(parsed)
|
||||
|
||||
-- Indicates if checks passes
|
||||
|
@ -6737,13 +6744,13 @@ function lit.exam(doc)
|
|||
|
||||
-- Language commands
|
||||
local langcmds = {
|
||||
["lua"] = {["int"] = "TODO"},
|
||||
["fennel"] = {["int"] = "TODO"},
|
||||
["python"] = {["ext"] = "TODO"},
|
||||
["js"] = {["ext"] = "TODO"},
|
||||
["ruby"] = {["ext"] = "TODO"},
|
||||
["lisp"] = {["ext"] = "TODO"},
|
||||
["graphviz"] = {["ext"] = "TODO"},
|
||||
["lua"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["fennel"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["python"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["js"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["ruby"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["lisp"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["graphviz"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
}
|
||||
|
||||
-- Prints error and does not pass the check
|
||||
|
@ -6759,14 +6766,14 @@ function lit.exam(doc)
|
|||
if ispass then
|
||||
if meta["lang"] and meta["cmd"] then
|
||||
lit.puts("ignore_lang", meta["cmd"], meta["lang"])
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
elseif not(meta["lang"]) and not(meta["cmd"])then
|
||||
meta["lang"] = "lua"
|
||||
meta["eval"] = langcmds["lua"]
|
||||
elseif meta["lang"] and not(meta["cmd"]) then
|
||||
meta["eval"] = langcmds[meta["lang"]]
|
||||
elseif not(meta["lang"]) and meta["cmd"] then
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
end
|
||||
end
|
||||
return meta
|
||||
|
@ -6860,15 +6867,28 @@ function lit.exam(doc)
|
|||
return addeval(meta)
|
||||
end
|
||||
|
||||
-- TODO
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
local function checkcode(code, meta)
|
||||
references = lpeg.match(lit.g("references"), code)
|
||||
if references then
|
||||
for _, ref in ipairs(references) do
|
||||
print("reference:", ref)
|
||||
end
|
||||
end
|
||||
return "TODO"
|
||||
end
|
||||
|
||||
lit.puts("checking", table.concat(parsed, ""):indent())
|
||||
local meta = parsemeta(parsed[1])
|
||||
-- TODO:
|
||||
-- meta["code"] = checkcode(parsed[2], meta)
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
-- TODO
|
||||
-- Add each meta to a variable
|
||||
-- Remove meta if doesn't pass checkcode
|
||||
meta["code"] = checkcode(parsed[2], meta)
|
||||
return meta
|
||||
end
|
||||
|
||||
local parsed = lpeg.match(lit.g("block"), codeblock.text)
|
||||
local parsed = lpeg.match(lit.g("declaration"), codeblock.text)
|
||||
local checked = (parsed ~= nil and check(parsed) or parsed)
|
||||
-- TODO:
|
||||
-- evaluated = eval(checked)
|
||||
|
|
|
@ -20,6 +20,9 @@ lit.status = true
|
|||
-- Grammars
|
||||
function lit.g(name)
|
||||
|
||||
-- Variable for grammars collection
|
||||
local grammars = {}
|
||||
|
||||
-- Lexical elements
|
||||
local newline = lpeg.P"\r"^-1 * lpeg.P"\n"
|
||||
local space = lpeg.S" \t"
|
||||
|
@ -29,20 +32,24 @@ function lit.g(name)
|
|||
local yamlheader = space^0 * lpeg.P"---" * space^0 * newline
|
||||
local yamlfooter = space^0 * lpeg.P"..." * space^0 * newline^-1
|
||||
local yamlbody = -yamlfooter * any^0 * newline
|
||||
-- Still not used
|
||||
local id = lpeg.R("az", "AZ") * lpeg.R("az", "AZ", "09")^0
|
||||
local ref = lpeg.P"#" * id
|
||||
local ref = -lpeg.B"\\" * lpeg.P"#" * lpeg.C(id)
|
||||
local notref = (1 - ref)^0
|
||||
|
||||
local grammars = {
|
||||
-- Block grammar
|
||||
["block"] = lpeg.P {
|
||||
"Block";
|
||||
Block = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
},
|
||||
-- Declaration grammar
|
||||
grammars["declaration"] = lpeg.P {
|
||||
"Declaration";
|
||||
Declaration = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
}
|
||||
|
||||
-- References grammar
|
||||
grammars["references"] = notref * lpeg.P {
|
||||
"References";
|
||||
References = lpeg.Ct((ref * notref)^0);
|
||||
} * -1
|
||||
|
||||
return grammars[name]
|
||||
end
|
||||
|
||||
|
@ -127,7 +134,7 @@ end
|
|||
-- Examinates (parses and evaluates) document
|
||||
function lit.exam(doc)
|
||||
|
||||
-- Evaluates code block
|
||||
-- Evaluates code declaration
|
||||
-- Evals Lisp code
|
||||
--[[
|
||||
local function eval(code)
|
||||
|
@ -145,10 +152,10 @@ function lit.exam(doc)
|
|||
end
|
||||
]]--
|
||||
|
||||
-- Parses code block
|
||||
-- Parses code declaration
|
||||
local function parse(codeblock)
|
||||
|
||||
-- Checks code block
|
||||
-- Checks code declarations
|
||||
local function check(parsed)
|
||||
|
||||
-- Indicates if checks passes
|
||||
|
@ -180,13 +187,13 @@ function lit.exam(doc)
|
|||
|
||||
-- Language commands
|
||||
local langcmds = {
|
||||
["lua"] = {["int"] = "TODO"},
|
||||
["fennel"] = {["int"] = "TODO"},
|
||||
["python"] = {["ext"] = "TODO"},
|
||||
["js"] = {["ext"] = "TODO"},
|
||||
["ruby"] = {["ext"] = "TODO"},
|
||||
["lisp"] = {["ext"] = "TODO"},
|
||||
["graphviz"] = {["ext"] = "TODO"},
|
||||
["lua"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["fennel"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["python"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["js"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["ruby"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["lisp"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["graphviz"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
}
|
||||
|
||||
-- Prints error and does not pass the check
|
||||
|
@ -202,14 +209,14 @@ function lit.exam(doc)
|
|||
if ispass then
|
||||
if meta["lang"] and meta["cmd"] then
|
||||
lit.puts("ignore_lang", meta["cmd"], meta["lang"])
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
elseif not(meta["lang"]) and not(meta["cmd"])then
|
||||
meta["lang"] = "lua"
|
||||
meta["eval"] = langcmds["lua"]
|
||||
elseif meta["lang"] and not(meta["cmd"]) then
|
||||
meta["eval"] = langcmds[meta["lang"]]
|
||||
elseif not(meta["lang"]) and meta["cmd"] then
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
end
|
||||
end
|
||||
return meta
|
||||
|
@ -303,15 +310,28 @@ function lit.exam(doc)
|
|||
return addeval(meta)
|
||||
end
|
||||
|
||||
-- TODO
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
local function checkcode(code, meta)
|
||||
references = lpeg.match(lit.g("references"), code)
|
||||
if references then
|
||||
for _, ref in ipairs(references) do
|
||||
print("reference:", ref)
|
||||
end
|
||||
end
|
||||
return "TODO"
|
||||
end
|
||||
|
||||
lit.puts("checking", table.concat(parsed, ""):indent())
|
||||
local meta = parsemeta(parsed[1])
|
||||
-- TODO:
|
||||
-- meta["code"] = checkcode(parsed[2], meta)
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
-- TODO
|
||||
-- Add each meta to a variable
|
||||
-- Remove meta if doesn't pass checkcode
|
||||
meta["code"] = checkcode(parsed[2], meta)
|
||||
return meta
|
||||
end
|
||||
|
||||
local parsed = lpeg.match(lit.g("block"), codeblock.text)
|
||||
local parsed = lpeg.match(lit.g("declaration"), codeblock.text)
|
||||
local checked = (parsed ~= nil and check(parsed) or parsed)
|
||||
-- TODO:
|
||||
-- evaluated = eval(checked)
|
||||
|
|
|
@ -9,6 +9,9 @@ lit.status = true
|
|||
-- Grammars
|
||||
function lit.g(name)
|
||||
|
||||
-- Variable for grammars collection
|
||||
local grammars = {}
|
||||
|
||||
-- Lexical elements
|
||||
local newline = lpeg.P"\r"^-1 * lpeg.P"\n"
|
||||
local space = lpeg.S" \t"
|
||||
|
@ -18,20 +21,24 @@ function lit.g(name)
|
|||
local yamlheader = space^0 * lpeg.P"---" * space^0 * newline
|
||||
local yamlfooter = space^0 * lpeg.P"..." * space^0 * newline^-1
|
||||
local yamlbody = -yamlfooter * any^0 * newline
|
||||
-- Still not used
|
||||
local id = lpeg.R("az", "AZ") * lpeg.R("az", "AZ", "09")^0
|
||||
local ref = lpeg.P"#" * id
|
||||
local ref = -lpeg.B"\\" * lpeg.P"#" * lpeg.C(id)
|
||||
local notref = (1 - ref)^0
|
||||
|
||||
local grammars = {
|
||||
-- Block grammar
|
||||
["block"] = lpeg.P {
|
||||
"Block";
|
||||
Block = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
},
|
||||
-- Declaration grammar
|
||||
grammars["declaration"] = lpeg.P {
|
||||
"Declaration";
|
||||
Declaration = lpeg.Ct(lpeg.V"YAML" * lpeg.V"Code", "name");
|
||||
YAML = lpeg.C(yamlheader * yamlbody^0 * yamlfooter);
|
||||
Code = lpeg.C((any + newline)^0);
|
||||
}
|
||||
|
||||
-- References grammar
|
||||
grammars["references"] = notref * lpeg.P {
|
||||
"References";
|
||||
References = lpeg.Ct((ref * notref)^0);
|
||||
} * -1
|
||||
|
||||
return grammars[name]
|
||||
end
|
||||
|
||||
|
@ -75,7 +82,7 @@ end
|
|||
-- Examinates (parses and evaluates) document
|
||||
function lit.exam(doc)
|
||||
|
||||
-- Evaluates code block
|
||||
-- Evaluates code declaration
|
||||
-- Evals Lisp code
|
||||
--[[
|
||||
local function eval(code)
|
||||
|
@ -93,10 +100,10 @@ function lit.exam(doc)
|
|||
end
|
||||
]]--
|
||||
|
||||
-- Parses code block
|
||||
-- Parses code declaration
|
||||
local function parse(codeblock)
|
||||
|
||||
-- Checks code block
|
||||
-- Checks code declarations
|
||||
local function check(parsed)
|
||||
|
||||
-- Indicates if checks passes
|
||||
|
@ -128,13 +135,13 @@ function lit.exam(doc)
|
|||
|
||||
-- Language commands
|
||||
local langcmds = {
|
||||
["lua"] = {["int"] = "TODO"},
|
||||
["fennel"] = {["int"] = "TODO"},
|
||||
["python"] = {["ext"] = "TODO"},
|
||||
["js"] = {["ext"] = "TODO"},
|
||||
["ruby"] = {["ext"] = "TODO"},
|
||||
["lisp"] = {["ext"] = "TODO"},
|
||||
["graphviz"] = {["ext"] = "TODO"},
|
||||
["lua"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["fennel"] = {["int_eval"] = { "CMD1", "CMD2", } },
|
||||
["python"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["js"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["ruby"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["lisp"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
["graphviz"] = {["ext_eval"] = { "CMD1", "CMD2", } },
|
||||
}
|
||||
|
||||
-- Prints error and does not pass the check
|
||||
|
@ -150,14 +157,14 @@ function lit.exam(doc)
|
|||
if ispass then
|
||||
if meta["lang"] and meta["cmd"] then
|
||||
lit.puts("ignore_lang", meta["cmd"], meta["lang"])
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
elseif not(meta["lang"]) and not(meta["cmd"])then
|
||||
meta["lang"] = "lua"
|
||||
meta["eval"] = langcmds["lua"]
|
||||
elseif meta["lang"] and not(meta["cmd"]) then
|
||||
meta["eval"] = langcmds[meta["lang"]]
|
||||
elseif not(meta["lang"]) and meta["cmd"] then
|
||||
meta["eval"] = {["ext"] = meta["cmd"]}
|
||||
meta["eval"] = {["ext_eval"] = { meta["cmd"] } }
|
||||
end
|
||||
end
|
||||
return meta
|
||||
|
@ -251,15 +258,28 @@ function lit.exam(doc)
|
|||
return addeval(meta)
|
||||
end
|
||||
|
||||
-- TODO
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
local function checkcode(code, meta)
|
||||
references = lpeg.match(lit.g("references"), code)
|
||||
if references then
|
||||
for _, ref in ipairs(references) do
|
||||
print("reference:", ref)
|
||||
end
|
||||
end
|
||||
return "TODO"
|
||||
end
|
||||
|
||||
lit.puts("checking", table.concat(parsed, ""):indent())
|
||||
local meta = parsemeta(parsed[1])
|
||||
-- TODO:
|
||||
-- meta["code"] = checkcode(parsed[2], meta)
|
||||
-- NOTE: if not valid code, return meta["eval"] = {}
|
||||
-- TODO
|
||||
-- Add each meta to a variable
|
||||
-- Remove meta if doesn't pass checkcode
|
||||
meta["code"] = checkcode(parsed[2], meta)
|
||||
return meta
|
||||
end
|
||||
|
||||
local parsed = lpeg.match(lit.g("block"), codeblock.text)
|
||||
local parsed = lpeg.match(lit.g("declaration"), codeblock.text)
|
||||
local checked = (parsed ~= nil and check(parsed) or parsed)
|
||||
-- TODO:
|
||||
-- evaluated = eval(checked)
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -1 +1 @@
|
|||
{"pandoc-api-version":[1,23],"meta":{},"blocks":[{"t":"Header","c":[1,["block-override",[],[]],[{"t":"Str","c":"Block"},{"t":"Space"},{"t":"Str","c":"Override"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn1\n...\n1 + 1"]},{"t":"Para","c":[{"t":"Str","c":"Override:"}]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn1\n...\n1 + 2"]},{"t":"Header","c":[1,["block-with-language-and-command",[],[]],[{"t":"Str","c":"Block"},{"t":"Space"},{"t":"Str","c":"with"},{"t":"Space"},{"t":"Str","c":"Language"},{"t":"Space"},{"t":"Str","c":"and"},{"t":"Space"},{"t":"Str","c":"Command"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn4\nlang: python\ncmd: python -E -X utf8\n...\n1 + 1"]},{"t":"Header","c":[1,["block-with-unused-argument",[],[]],[{"t":"Str","c":"Block"},{"t":"Space"},{"t":"Str","c":"with"},{"t":"Space"},{"t":"Str","c":"Unused"},{"t":"Space"},{"t":"Str","c":"Argument"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn3\nargs:\n a: 1\n...\n1 + 1"]}]}
|
||||
{"pandoc-api-version":[1,23],"meta":{},"blocks":[{"t":"Header","c":[1,["declaration-override",[],[]],[{"t":"Str","c":"Declaration"},{"t":"Space"},{"t":"Str","c":"Override"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn1\n...\n1 + 1"]},{"t":"Para","c":[{"t":"Str","c":"Override:"}]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn1\n...\n1 + 2"]},{"t":"Header","c":[1,["declaration-with-language-and-command",[],[]],[{"t":"Str","c":"Declaration"},{"t":"Space"},{"t":"Str","c":"with"},{"t":"Space"},{"t":"Str","c":"Language"},{"t":"Space"},{"t":"Str","c":"and"},{"t":"Space"},{"t":"Str","c":"Command"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn4\nlang: python\ncmd: python -E -X utf8\n...\n1 + 1"]},{"t":"Header","c":[1,["declaration-with-unused-argument",[],[]],[{"t":"Str","c":"Declaration"},{"t":"Space"},{"t":"Str","c":"with"},{"t":"Space"},{"t":"Str","c":"Unused"},{"t":"Space"},{"t":"Str","c":"Argument"}]]},{"t":"CodeBlock","c":[["",[],[]],"---\nid: fn3\nargs:\n a: 1\n...\n1 + 1"]}]}
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Invalid Blocks
|
||||
# Invalid Declarations
|
||||
|
||||
All errors should be collected, printed and exit with 1.
|
||||
|
||||
|
@ -102,13 +102,6 @@ Misses arg:
|
|||
...
|
||||
#a + #b
|
||||
|
||||
Invalid code:
|
||||
|
||||
---
|
||||
id: fn1
|
||||
...
|
||||
false + false
|
||||
|
||||
Infinite loop:
|
||||
|
||||
---
|
||||
|
@ -118,7 +111,14 @@ Infinite loop:
|
|||
...
|
||||
#fn1(2) * #x
|
||||
|
||||
# Blocks for Invalid Inserts:
|
||||
Invalid code:
|
||||
|
||||
---
|
||||
id: fn1
|
||||
...
|
||||
false + false
|
||||
|
||||
# Declarations With Invalid Calls:
|
||||
|
||||
---
|
||||
id: fn1
|
||||
|
@ -129,7 +129,7 @@ Infinite loop:
|
|||
...
|
||||
#a * #b
|
||||
|
||||
# Invalid Inserts
|
||||
# Invalid Calls
|
||||
|
||||
- `fn1(` never end
|
||||
- `fn1(invalid arg)`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Inserts Before Blocks
|
||||
# Calls Before Declarations
|
||||
|
||||
- `fn1()``fn2()`
|
||||
- `fn3(true)`
|
||||
|
@ -6,9 +6,10 @@
|
|||
- `fn3(n: false)`
|
||||
- `fn4(b: 4, a: 5)`
|
||||
|
||||
# Literate Blocks
|
||||
# Declarations
|
||||
|
||||
All literate blocks should be print on `--verbose`.
|
||||
All literate declarations goes in code blocks that should be printed on
|
||||
`--verbose`.
|
||||
|
||||
Minimal (Lua by default):
|
||||
|
||||
|
@ -147,14 +148,14 @@ With inner inner function:
|
|||
...
|
||||
#a + #fn4(#a, #fn1())
|
||||
|
||||
# Code Blocks
|
||||
# Code Blocks That Are Not Declarations
|
||||
|
||||
Always ignored:
|
||||
|
||||
---
|
||||
echo "Ignore me!"
|
||||
|
||||
# Inserts and Data Types
|
||||
# Calls and Data Types
|
||||
|
||||
- `fn3(true)`
|
||||
- `fn3(false)`
|
||||
|
@ -166,7 +167,7 @@ Always ignored:
|
|||
- `fn5(1.0)`
|
||||
- `fn5("str")`
|
||||
|
||||
# Messy Inserts
|
||||
# Messy Calls
|
||||
|
||||
- `fn1( )`
|
||||
- `fn3("\"str\"")`
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# Block Override
|
||||
# Declaration Override
|
||||
|
||||
---
|
||||
id: fn1
|
||||
|
@ -12,7 +12,7 @@ Override:
|
|||
...
|
||||
1 + 2
|
||||
|
||||
# Block with Language and Command
|
||||
# Declaration with Language and Command
|
||||
|
||||
---
|
||||
id: fn4
|
||||
|
@ -21,7 +21,7 @@ Override:
|
|||
...
|
||||
1 + 1
|
||||
|
||||
# Block with Unused Argument
|
||||
# Declaration with Unused Argument
|
||||
|
||||
---
|
||||
id: fn3
|
||||
|
|
Loading…
Reference in New Issue