1package a
2
3import (
4 . "github.com/alecthomas/chroma" // nolint
5 "github.com/alecthomas/chroma/lexers/internal"
6)
7
8// Apl lexer.
9var Apl = internal.Register(MustNewLexer(
10 &Config{
11 Name: "APL",
12 Aliases: []string{"apl"},
13 Filenames: []string{"*.apl"},
14 MimeTypes: []string{},
15 },
16 Rules{
17 "root": {
18 {`\s+`, Text, nil},
19 {`[β#].*$`, CommentSingle, nil},
20 {`\'((\'\')|[^\'])*\'`, LiteralStringSingle, nil},
21 {`"(("")|[^"])*"`, LiteralStringDouble, nil},
22 {`[ββ()]`, Punctuation, nil},
23 {`[\[\];]`, LiteralStringRegex, nil},
24 {`β[A-Za-zΞββ][A-Za-zΞββ_Β―0-9]*`, NameFunction, nil},
25 {`[A-Za-zΞββ][A-Za-zΞββ_Β―0-9]*`, NameVariable, nil},
26 {`Β―?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+Β―]?[0-9]+)?|Β―|β)([Jj]Β―?(0[Xx][0-9A-Fa-f]+|[0-9]*\.?[0-9]+([Ee][+Β―]?[0-9]+)?|Β―|β))?`, LiteralNumber, nil},
27 {`[\.\\/βΏβΒ¨β£β¨β β€β]`, NameAttribute, nil},
28 {`[+\-ΓΓ·βββ£|β³?*ββ!βΉ<β€=>β₯β β‘β’ββ·βͺβ©~β¨β§β±β²β΄,βͺβ½βββββββ·βββ€β₯βββ£β’ββββΈβ―β]`, Operator, nil},
29 {`β¬`, NameConstant, nil},
30 {`[ββ]`, NameVariableGlobal, nil},
31 {`[ββ]`, KeywordDeclaration, nil},
32 {`[βΊβ΅βΆβΉβ:]`, NameBuiltinPseudo, nil},
33 {`[{}]`, KeywordType, nil},
34 },
35 },
36))