site/node_modules/shiki/dist/langs/fortran-free-form.mjs

7 lines
101 KiB
JavaScript
Raw Normal View History

2024-10-14 06:09:33 +00:00
const lang = Object.freeze({ "displayName": "Fortran (Free Form)", "fileTypes": ["f90", "F90", "f95", "F95", "f03", "F03", "f08", "F08", "f18", "F18", "fpp", "FPP", ".pf", ".PF"], "firstLineMatch": "(?i)-[*]- mode: fortran free -[*]-", "injections": { "source.fortran.free - ( string | comment | meta.preprocessor )": { "patterns": [{ "include": "#line-continuation-operator" }, { "include": "#preprocessor" }] }, "string.quoted.double.fortran": { "patterns": [{ "include": "#string-line-continuation-operator" }] }, "string.quoted.single.fortran": { "patterns": [{ "include": "#string-line-continuation-operator" }] } }, "name": "fortran-free-form", "patterns": [{ "include": "#preprocessor" }, { "include": "#comments" }, { "include": "#constants" }, { "include": "#operators" }, { "include": "#array-constructor" }, { "include": "#parentheses" }, { "include": "#include-statement" }, { "include": "#import-statement" }, { "include": "#block-data-definition" }, { "include": "#function-definition" }, { "include": "#module-definition" }, { "include": "#program-definition" }, { "include": "#submodule-definition" }, { "include": "#subroutine-definition" }, { "include": "#procedure-definition" }, { "include": "#derived-type-definition" }, { "include": "#enum-block-construct" }, { "include": "#interface-block-constructs" }, { "include": "#procedure-specification-statement" }, { "include": "#type-specification-statements" }, { "include": "#specification-statements" }, { "include": "#control-constructs" }, { "include": "#control-statements" }, { "include": "#execution-statements" }, { "include": "#intrinsic-functions" }, { "include": "#variable" }], "repository": { "IO-item-list": { "begin": `(?i)(?=\\s*[a-z0-9"'])`, "comment": "Name list.", "contentName": "meta.name-list.fortran", "end": "(?=[\\);!\\n])", "patterns": [{ "include": "#constants" }, { "include": "#operators" }, { "include": "#intrinsic-functions" }, { "include": "#array-constructor" }, { "include": "#parentheses" }, { "include": "#brackets" }, { "include": "#assignment-keyword" }, { "include": "#operator-keyword" }, { "include": "#variable" }] }, "IO-keywords": { "begin": "(?i)\\G\\s*\\b(?:(read)|(write))\\s*(\\()", "beginCaptures": { "1": { "name": "keyword.control.generic-spec.read.fortran" }, "2": { "name": "keyword.control.generic-spec.write.fortran" }, "3": { "name": "punctuation.parentheses.left.fortran" } }, "comment": "IO generic specification.", "end": "(\\))", "endCaptures": { "1": { "name": "punctuation.parentheses.right.fortran" } }, "patterns": [{ "captures": { "1": { "name": "keyword.control.generic-spec.formatted.fortran" }, "2": { "name": "keyword.control.generic-spec.unformatted.fortran" } }, "match": "(?i)\\G\\s*\\b(?:(formatted)|(unformatted))\\b" }, { "include": "#invalid-word" }] }, "IO-statements": { "patterns": [{ "begin": "(?ix)\\b(?:(backspace)|(close)|(endfile)|(format)|(inquire)|(open)|(read)|(rewind)|(write))\\s*(?=\\()", "beginCaptures": { "1": { "name": "keyword.control.backspace.fortran" }, "2": { "name": "keyword.control.close.fortran" }, "3": { "name": "keyword.control.endfile.fortran" }, "4": { "name": "keyword.control.format.fortran" }, "5": { "name": "keyword.control.inquire.fortran" }, "6": { "name": "keyword.control.open.fortran" }, "7": { "name": "keyword.control.read.fortran" }, "8": { "name": "keyword.control.rewind.fortran" }, "9": { "name": "keyword.control.write.fortran" }, "10": { "name": "punctuation.parentheses.left.fortran" } }, "comment": "Introduced in the Fortran 1977 standard.", "end": "(?=[;!\\n])", "endCaptures": { "1": { "name": "punctuation.parentheses.right.fortran" } }, "name": "meta.statement.IO.fortran", "patterns": [{ "include": "#parentheses-dummy-variables" }, { "include": "#IO-item-list" }] }, { "captures": { "1": { "name": "keyword.control.backspace.fortran" }, "2": { "name": "keyword.control.endfile.fortran" }, "3": { "name": "keyword.control.format.fortran" }, "4": { "name": "keyword.control.print.fortran" }, "5": { "name": "keyword.control.read.fortran" }, "6": { "name": "keyword.control.rewind.fortran" } },
var fortran_free_form = [
lang
];
export { fortran_free_form as default };