                   for y in ['constructor', 'destructor', 'method', 'trigger'] when x == y[...x.length] then ok = 1; break
                 else
                   ok = 1
-            ok && 'apl-kw' || 'apl-err'
+              when '' then ok = h.kw == 'class' # ":" is allowed after ":Class" to specify inheritance
+            if ok then h.kw = kw; 'apl-kw' else delete h.kw; 'apl-err'
         else
           if name0.test c
             stream.match name1; x = stream.current(); dd = dfnDepth a

      switch c
        when ' ' then stream.eatSpace(); null
        when '⍝' then stream.skipToEnd(); 'apl-com'
        when '←' then 'apl-asgn'
        when "'" then (if stream.match /^(?:[^'\r\n]|'')*'/ then 'apl-str' else stream.skipToEnd(); 'apl-err')
        when '⍬' then 'apl-zld'

        when ']' then (if la.t == '[' then a.pop(); 'apl-sqbr' else 'apl-err')
        when '}' then (if la.t == '{' then a.pop(); "apl-dfn#{1 + dfnDepth a} apl-dfn" else 'apl-err')
        when ';' then la.t == '[' && 'apl-semi' || 'apl-err'
        when '⎕' then stream.match(/[áa-z0-9]*/i)?[0].toLowerCase() in quadNames && 'apl-quad' || 'apl-err'
        when '⍞' then 'apl-quad'
        when '#' then 'apl-ns'
