module Proteome.Tags.Syntax where
import Exon (exon)
import Ribosome.Syntax (HiLink (HiLink), Syntax, build, link, match, prefix, (#>), (>-))
tagsSyntax :: Syntax
tagsSyntax :: Syntax
tagsSyntax =
(IsLabel "links" (ASetter Syntax Syntax [HiLink] [HiLink])
ASetter Syntax Syntax [HiLink] [HiLink]
#links ASetter Syntax Syntax [HiLink] [HiLink]
-> [HiLink] -> Syntax -> Syntax
forall a s t. Monoid a => ASetter s t a a -> a -> s -> t
<>~ [SyntaxGroup -> SyntaxGroup -> HiLink
HiLink SyntaxGroup
"Module" SyntaxGroup
"Type"]) (Syntax -> Syntax) -> Syntax -> Syntax
forall a b. (a -> b) -> a -> b
$ Alg -> Syntax
build (Alg -> Syntax) -> Alg -> Syntax
forall a b. (a -> b) -> a -> b
$ SyntaxGroup -> Alg -> Alg
prefix SyntaxGroup
"ProTags" (Alg -> Alg) -> Alg -> Alg
forall a b. (a -> b) -> a -> b
$
SyntaxGroup -> Text -> Alg
match SyntaxGroup
"Line" Text
"^.*$" Alg -> Alg -> Alg
#> SyntaxGroup -> Text -> Alg
match SyntaxGroup
"Name" [exon|🟣 \S\+|] Alg -> Alg -> Alg
>- SyntaxGroup -> Alg -> Alg
link SyntaxGroup
"Directory" (SyntaxGroup -> Text -> Alg
match SyntaxGroup
"Package" [exon|📦 \S\+|]) Alg -> Alg -> Alg
>-
SyntaxGroup -> Alg -> Alg
link SyntaxGroup
"Module" (SyntaxGroup -> Text -> Alg
match SyntaxGroup
"Module" [exon|\S\+|])