From c6cc0108ca7738023b45e0eeac0fa2390532dd93 Mon Sep 17 00:00:00 2001 From: Mitja Felicijan Date: Fri, 25 Oct 2024 00:47:47 +0200 Subject: Added vendor lock on deps --- .../alecthomas/chroma/v2/lexers/fortran_fixed.go | 38 ++++++++++++++++++++++ 1 file changed, 38 insertions(+) create mode 100644 vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go (limited to 'vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go') diff --git a/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go b/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go new file mode 100644 index 0000000..d93ac1e --- /dev/null +++ b/vendor/github.com/alecthomas/chroma/v2/lexers/fortran_fixed.go @@ -0,0 +1,38 @@ +package lexers + +import ( + . "github.com/alecthomas/chroma/v2" // nolint +) + +// FortranFixed lexer. +var FortranFixed = Register(MustNewLexer( + &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")), + }, + } + }, +)) -- cgit v1.2.3