diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-12-01 17:59:57 -0500 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2020-12-01 17:59:57 -0500 |
| commit | d85a2676ccc2bf9c386628b6da128ac5fd5862a2 (patch) | |
| tree | f1445ef857837d092c3363b56b466d9eda98cf49 | |
| parent | 5e2c76cf17cb0aae532e19ca2f93960882ef74cb (diff) | |
Replace •LNS with •FLines and •FChars
| -rwxr-xr-x | dzref | 2 | ||||
| -rw-r--r-- | md.bqn | 8 | ||||
| -rwxr-xr-x | src/cjs.bqn | 6 | ||||
| -rwxr-xr-x | src/pr.bqn | 2 | ||||
| -rwxr-xr-x | test/dz_comp | 4 | ||||
| -rw-r--r-- | tutorial/evalexp.bqn | 2 |
6 files changed, 12 insertions, 12 deletions
@@ -115,7 +115,7 @@ _withRef ← ˙ lf ← @+10 pre ← E_isdef◶E_proc‿E_redef¨ lf((⊢-˜¬×+`)∘=⊔⊢)impl ExecFile←{ - src ← E_proc¨ •LNS 𝕩 + src ← E_proc¨ •FLines 𝕩 ⟨⟨⟩,"",(∨`⌾⌽'/'=𝕩)/𝕩⟩ Raw ∾ ∾⟜lf¨ src } _withRef ↩ {𝔽∘E_proc⊘(𝔽⟜E_proc)} @@ -306,7 +306,7 @@ Markdown ← {filename𝕊𝕩: IsHtmlBlock ← ("<!--"≡4↑⊢)◶('>'∨´∘=⊢)‿2 ProcComment ← { n←≠s←"<!--GEN" ⋄ l←¯3↓⍟(1=≠𝕩)⊑𝕩 ⋄ a←s≡n↑l - Source ← {((0<≠)◶<‿(•LNS path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} + Source ← {((0<≠)◶<‿(•FLines path∾⊢) Trim n↓l) ∾ 1↓¯1↓𝕩} ⟨⟨⟩,"",path⟩ GenHtml⍟a JoinLines Source⍟a 𝕩 } ProcHtml ← { @@ -506,7 +506,7 @@ Markdown ← {filename𝕊𝕩: # Uses the test cases at https://spec.commonmark.org/0.29/spec.json # since Github doesn't seem to have published theirs TestSections ← { - tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊ 2↓•LNS"spec.json" + tests ← ¯2 ↓˘ 8⊸(÷˜⟜≠∾⊣)⊸⥊ 2↓•FLines"spec.json" tests ↩ ((⊑2+⊐⟜':')¨∘⊏ ((-','=¯1⊑⊢)↓↓)¨⎉1 ⊢) tests testSection ← (1↓¯1↓⊢)¨ 5⊏˘tests UnEscape ← { @@ -634,7 +634,7 @@ ConvertFile ← { fileout ← ".html" ∾˜ (¯6⊸↓∾"index"˙)⍟("README"⊸MatchEnd) ¯3↓𝕩 # Contents of file to convert - md ← •LNS 𝕩 + md ← •FLines 𝕩 # Verify and remove the html link line: the output *is* the html file. IsView ← "*View this file"⊸MatchStart ∧ (siteURL∾fileout∾").*")⊸MatchEnd ⟨"File ",𝕩," has missing or incorrect view link"⟩ ∾⊸! IsView ⊑md @@ -656,5 +656,5 @@ ConvertFile ← { crumbs ← up ("a href='"∾∾⟜"index.html'")⊸Html¨○((-isInd)⊸↓) (<"main")»parts nav ← RQ "div class='nav'" Html 3↓∾ " / "⊸∾¨ repo <⊸∾ crumbs front ← head ∾○(∾⟜lf) nav - ("docs/"∾fileout) •LNS front ∾ out + ("docs/"∾fileout) •FChars front ∾ out } diff --git a/src/cjs.bqn b/src/cjs.bqn index 3fae00a8..1e57b220 100755 --- a/src/cjs.bqn +++ b/src/cjs.bqn @@ -15,8 +15,8 @@ Frun ← ("provide.concat("∾∾⟜")")⌾(1⊸⊑) Fout Long ← ∾ (≠↑1‿3/⟨" "⊸∾⋄((@+10)∾" ,")⊸∾⟩˙) {𝕎𝕩}¨ ⊢ •Out (⊑"r"‿"c"‿"f"‿"e"⊐⊏)◶⟨ {𝕩⋄ref‿len←•Import"pr.bqn"⋄Long Frun len⊸↓⌾(1⊸⊑)Comp ref} - {𝕩⋄Long Fout Comp J •LNS "c.bqn"} - {𝕩⋄Long Fout Comp J •LNS "f.bqn"} - {𝕩⋄Long Fout Comp J ⟨"Modify←GetHighlights←⊢"⟩∾∾ •LNS∘∾⟜".bqn"¨ "../svg"‿"e"} + {𝕩⋄Long Fout Comp •FChars "c.bqn"} + {𝕩⋄Long Fout Comp •FChars "f.bqn"} + {𝕩⋄Long Fout Comp ⟨"Modify←GetHighlights←⊢⋄"⟩∾∾ •FChars∘∾⟜".bqn"¨ "../svg"‿"e"} ¯1 ↓ · J L∘Fout∘Comp¨ ⟩ args @@ -2,7 +2,7 @@ # Process BQN runtime -impl ← •LNS "r.bqn" +impl ← •FLines "r.bqn" chrs←⟨ "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" diff --git a/test/dz_comp b/test/dz_comp index 9f336b07..58cd2f0f 100755 --- a/test/dz_comp +++ b/test/dz_comp @@ -21,8 +21,8 @@ GetRT ← {𝕤: Native ← {⍎𝕩} exec ← (rt¬nc)◶⟨Native˙, DRun˙, {𝕩⊸DRun}∘GetRT⟩ @ -c ← ∾(•LNS ∾⟜"cases.bqn")¨""‿"b" -{𝕩: c ∾↩ "1 %"⊸∾¨ (0<≠)◶0‿((¬":"⊑∘∊⊢)∧'#'≠⊑)¨⊸/ •LNS "prim.bqn" }⍟⊢ prim +c ← ∾(•FLines ∾⟜"cases.bqn")¨""‿"b" +{𝕩: c ∾↩ "1 %"⊸∾¨ (0<≠)◶0‿((¬":"⊑∘∊⊢)∧'#'≠⊑)¨⊸/ •FLines "prim.bqn" }⍟⊢ prim M ← {e‿b: Err ← {(@+10)∾˜""""∾b∾""": expected "∾e∾" but received "∾⍕𝕩} (Native e) ≢◶""‿Err Exec b diff --git a/tutorial/evalexp.bqn b/tutorial/evalexp.bqn index 048181ee..4ff584f6 100644 --- a/tutorial/evalexp.bqn +++ b/tutorial/evalexp.bqn @@ -1,2 +1,2 @@ Compile ← (↕62)⊸(•Import "../src/c.bqn") -DrawEval ← Compile⊸(⍎ ∾∾⟜(@+10)¨ •LNS "../src/e.bqn") +DrawEval ← Compile⊸(⍎ •FChars "../src/e.bqn") |
