diff options
| -rw-r--r-- | md.bqn | 7 | ||||
| -rw-r--r-- | src/glyphs.bqn | 6 | ||||
| -rwxr-xr-x | src/pr.bqn | 6 | ||||
| -rw-r--r-- | test/ref.bqn | 6 |
4 files changed, 12 insertions, 13 deletions
@@ -542,12 +542,13 @@ idChars ← ⟨ # (include will be all 1s). GetHighlights ← { # Characters used by BQN, and the HTML class they are associated with. + func‿mod1‿mod2 ← •Import "src/glyphs.bqn" classes‿chars ← <˘ ⍉ ∘‿2⥊⟨ 0 , " "∾@+9‿10 # Should never be highlighted "Value" , ¯1⊏˘5‿2⥊"𝕨𝕩𝕗𝕘𝕤"# Hack around UTF-16 - "Function" , "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!"∾¯1⊏˘5‿2⥊"𝕎𝕏𝔽𝔾𝕊" - "Modifier" , "˙˜˘¨⌜⁼´˝`" - "Modifier2" , "∘○⊸⟜⌾⊘◶⎉⚇⍟⎊" + "Function" , func∾¯1⊏˘5‿2⥊"𝕎𝕏𝔽𝔾𝕊" + "Modifier" , mod1 + "Modifier2" , mod2 "Number" , ∾idChars # Will be classified among ↑↑ later "Gets" , "←⇐↩→" "Paren" , "()" diff --git a/src/glyphs.bqn b/src/glyphs.bqn new file mode 100644 index 00000000..f252b8c4 --- /dev/null +++ b/src/glyphs.bqn @@ -0,0 +1,6 @@ +# BQN primitive glyphs: functions, 1-modifiers, 2-modifiers +⟨ + "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" + "˙˜˘¨⌜⁼´˝`" + "∘○⊸⟜⌾⊘◶⎉⚇⍟⎊" +⟩ @@ -3,11 +3,7 @@ # Process BQN runtime # All primitives -chrs←⟨ - "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" - "˙˜˘¨⌜⁼´˝`" - "∘○⊸⟜⌾⊘◶⎉⚇⍟⎊" -⟩ +chrs←•Import "glyphs.bqn" glyphs ⇐ ∾chrs # Provided values, to be passed in through the constants array diff --git a/test/ref.bqn b/test/ref.bqn index 2eb79d5d..b7fb8c3a 100644 --- a/test/ref.bqn +++ b/test/ref.bqn @@ -13,11 +13,7 @@ defTok ← (¯1+`·¬·»⊸∧∊⟜idChars)⊸⊔¨ defs depend ← <∘/˘ range ∧ > (names∊LC¨)¨ (0=·+`·-˝"{"‿"}"≡⌜⊢)⊸/¨defTok order ← {{(𝕨⊸∨𝕊⍟(𝕩<○≠⊢)𝕩∾/)(0»∨`)⊸<𝕨<∧´∘⊏⟜𝕨¨l}⟜/0¨l←𝕩} depend -chrs←⟨ - "+-×÷⋆√⌊⌈|¬∧∨<>≠=≤≥≡≢⊣⊢⥊∾≍↑↓↕«»⌽⍉/⍋⍒⊏⊑⊐⊒∊⍷⊔!" - "˙˜˘¨⌜⁼´˝`" - "∘○⊸⟜⌾⊘◶⎉⚇⍟⎊" -⟩ +chrs ← •Import "../src/glyphs.bqn" def‿keep ← ⊑¨⌾(1⊸⊑) (1=≠)¨⊸⊔ anames keep∾↩"⌾⎊" |
