⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 shbrushfortran.js

📁 本人参见电子竞赛的时候搜集和整理的有关电子秤的资料
💻 JS
字号:
dp.sh.Brushes.CFortran = function()
{
	var keywords =	'DO ALLOCATABLE ALLOCATE CASE CONTAINS CYCLE DEALLOCATE ELSEWHERE ENDWHERE INTENT' +
					'INTERFACE MODULE NAMELIST OPTIONAL PRIVATE PROCEDURE PUBLIC REWRITE SELECT SELECT WHERE' +
					'ACCEPT ASSIGN AUTOMATIC BACKSPACE CLOSE BLOCK COMMON CONTINUE DATA DECODE DELETE CALL' +
					'DIMENSION ELSE ELSEIF ENCODE END FILE ENDFILE END ENDIF ENTRY EQUIVALENCE EXIT'+
					'EXTERNAL FORMAT FUNCTION GOTO IMPLICIT INCLUDE INQUIRE INTRINSIC LOGICAL'+
					'MAP NONE OPEN PARAMETER PAUSE POINTER PRINT PROGRAM READ RECORD RETURN REWIND SAVE'+
					'STATIC STOP STRUCTURE SUBROUTINE THEN TO TYPE UNION UNLOCK SYSTEM VIRTUAL'+
					'VOLATILE WHILE';
                                 
					
	var datatypes = 
	'BYTE CHARACTER COMPLEX DOUBLE PRECISION INTEGER REAL';
	this.regexList = [
		// There's a slight problem with matching single line comments and figuring out
		// a difference between // and ///. Using lookahead and lookbehind solves the
		// problem, unfortunately JavaScript doesn't support lookbehind. So I'm at a 
		// loss how to translate that regular expression to JavaScript compatible one.
//		{ regex: new RegExp('(?<!/)//(?!/).*$|(?<!/)////(?!/).*$|/\\*[^\\*]*(.)*?\\*/', 'gm'),	css: 'comment' },			// one line comments starting with anything BUT '///' and multiline comments
//		{ regex: new RegExp('(?<!/)///(?!/).*$', 'gm'),											css: 'comments' },		// XML comments starting with ///

		{ regex: new RegExp('\\!.*$', 'gm'),				css: 'comment' },			// one line comments
		//{ regex: new RegExp('%{(?!\\$)[\\s\\S]*?}%', 'gm'),		css: 'comment' },  			// multiline comments %{ }%	
		

		{ regex: dp.sh.RegexLib.DoubleQuotedString,					css: 'string' },			// strings
		{ regex: dp.sh.RegexLib.SingleQuotedString,					css: 'string' },			// strings
    { regex: new RegExp(this.GetKeywords(datatypes), 'gm'),		css: 'datatypes' },
		{ regex: new RegExp(this.GetKeywords(keywords), 'gm'),		css: 'keyword' }			// Matlab M keyword
		];

	this.CssClass = 'dp-fortran';
	//this.Style = '.dp-fortran .vars { color: #d00; }';
}

dp.sh.Brushes.CFortran.prototype	= new dp.sh.Highlighter();
dp.sh.Brushes.CFortran.Aliases	= ['fortran'];

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -