mirror of
https://github.com/go-gitea/gitea.git
synced 2024-08-25 21:57:29 +02:00
* Add Dependencie Update Script * update gitea.com/lunny/levelqueue * update github.com/PuerkitoBio/goquery * update github.com/alecthomas/chroma * update github.com/blevesearch/bleve/v2 * update github.com/caddyserver/certmagic * update github.com/go-enry/go-enry/v2 * update github.com/go-redis/redis/v8 * update github.com/hashicorp/golang-lru * update github.com/klauspost/compress * update github.com/markbates/goth * update github.com/mholt/archiver/v3 * update github.com/microcosm-cc/bluemonday * update github.com/minio/minio-go/v7 * update github.com/olivere/elastic/v7 * update github.com/xanzy/go-gitlab * update github.com/yuin/goldmark
40 lines
972 B
Go
Vendored
40 lines
972 B
Go
Vendored
package f
|
|
|
|
import (
|
|
. "github.com/alecthomas/chroma" // nolint
|
|
"github.com/alecthomas/chroma/lexers/internal"
|
|
)
|
|
|
|
// FortranFixed lexer.
|
|
var FortranFixed = internal.Register(MustNewLazyLexer(
|
|
&Config{
|
|
Name: "FortranFixed",
|
|
Aliases: []string{"fortranfixed"},
|
|
Filenames: []string{"*.f", "*.F"},
|
|
MimeTypes: []string{"text/x-fortran"},
|
|
NotMultiline: true,
|
|
CaseInsensitive: true,
|
|
},
|
|
func() Rules {
|
|
return Rules{
|
|
"root": {
|
|
{`[C*].*\n`, Comment, nil},
|
|
{`#.*\n`, CommentPreproc, nil},
|
|
{`[\t ]*!.*\n`, Comment, nil},
|
|
{`(.{5})`, NameLabel, Push("cont-char")},
|
|
{`.*\n`, Using(Fortran), nil},
|
|
},
|
|
"cont-char": {
|
|
{` `, Text, Push("code")},
|
|
{`0`, Comment, Push("code")},
|
|
{`.`, GenericStrong, Push("code")},
|
|
},
|
|
"code": {
|
|
{`(.{66})(.*)(\n)`, ByGroups(Using(Fortran), Comment, Text), Push("root")},
|
|
{`.*\n`, Using(Fortran), Push("root")},
|
|
Default(Push("root")),
|
|
},
|
|
}
|
|
},
|
|
))
|