aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarshall Lochbaum <mwlochbaum@gmail.com>2021-05-06 13:14:23 -0400
committerMarshall Lochbaum <mwlochbaum@gmail.com>2021-05-06 13:14:23 -0400
commit299e5ce3aeb4d4b3b8afece41fc0e0b046c3888e (patch)
tree58255a8182fb14f8d5e2cff54980fa297626197e
parentaa396f30dc8c4650778a5ede37b670a9289cc14e (diff)
Check for all-underscore words
-rw-r--r--src/c.bqn1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/c.bqn b/src/c.bqn
index af30664c..6487caa7 100644
--- a/src/c.bqn
+++ b/src/c.bqn
@@ -59,6 +59,7 @@ Tokenize←{
nd←(t=⊑bN)>«t M bD # Namespace dot
w←»⊸<l←nd<t M bN(⊣≍-˜)○⊑bW # Word chars l, start w
us←t=¯1++´bA⋄sy←t=⊑bW # Underscore, system dot
+ {⟨/us∧w+`⊸⊏0∾𝕩,"Words can't only have underscores"⟩!0}⍟(∨´)w(/<1(⊢/«)(∨/⊣))l>us
wk←na⌊∘÷˜(⊑bA)-˜w/t # Kind of word from first char
t-↩na×l∧t≥na+⊑bA # Case-insensitive
{⟨𝕩/is,"System dot with no name"⟩!0}⍟(∨´)sy>«l