Podświetlanie składni w edytorze XML dzięki editArea. Closes #17. Niestety dla tekstó...
[redakcja.git] / project / static / js / reg_syntax / pas.js
diff --git a/project/static/js/reg_syntax/pas.js b/project/static/js/reg_syntax/pas.js
new file mode 100755 (executable)
index 0000000..7c1bc3c
--- /dev/null
@@ -0,0 +1,82 @@
+editAreaLoader.load_syntax["pas"] = {\r
+       'COMMENT_SINGLE' : {}\r
+       ,'COMMENT_MULTI' : {'{' : '}', '(*':'*)'}\r
+       ,'QUOTEMARKS' : {1: '"', 2: "'"}\r
+       ,'KEYWORD_CASE_SENSITIVE' : false\r
+       ,'KEYWORDS' : {\r
+               'constants' : [\r
+                       'Blink', 'Black', 'Blue', 'Green', 'Cyan', 'Red',\r
+                       'Magenta', 'Brown', 'LightGray', 'DarkGray',\r
+                       'LightBlue', 'LightGreen', 'LightCyan', 'LightRed',\r
+                       'LightMagenta', 'Yellow', 'White', 'MaxSIntValue',\r
+                       'MaxUIntValue', 'maxint', 'maxLongint', 'maxSmallint',\r
+                       'erroraddr', 'errorcode', 'LineEnding'\r
+               ]\r
+               ,'keywords' : [\r
+                       'in', 'or', 'div', 'mod', 'and', 'shl', 'shr', 'xor',\r
+                       'pow', 'is', 'not','Absolute', 'And_then', 'Array',\r
+                       'Begin', 'Bindable', 'Case', 'Const', 'Do', 'Downto',\r
+                       'Else', 'End', 'Export', 'File', 'For', 'Function',\r
+                       'Goto', 'If', 'Import', 'Implementation', 'Inherited',\r
+                       'Inline', 'Interface', 'Label', 'Module', 'Nil',\r
+                       'Object', 'Of', 'Only', 'Operator', 'Or_else',\r
+                       'Otherwise', 'Packed', 'Procedure', 'Program',\r
+                       'Protected', 'Qualified', 'Record', 'Repeat',\r
+                       'Restricted', 'Set', 'Then', 'To', 'Type', 'Unit',\r
+                       'Until', 'Uses', 'Value', 'Var', 'Virtual', 'While',\r
+                       'With'\r
+               ]\r
+               ,'functions' : [\r
+                       'Abs', 'Addr', 'Append', 'Arctan', 'Assert', 'Assign',\r
+                       'Assigned', 'BinStr', 'Blockread', 'Blockwrite',\r
+                       'Break', 'Chdir', 'Chr', 'Close', 'CompareByte',\r
+                       'CompareChar', 'CompareDWord', 'CompareWord', 'Concat',\r
+                       'Continue', 'Copy', 'Cos', 'CSeg', 'Dec', 'Delete',\r
+                       'Dispose', 'DSeg', 'Eof', 'Eoln', 'Erase', 'Exclude',\r
+                       'Exit', 'Exp', 'Filepos', 'Filesize', 'FillByte',\r
+                       'Fillchar', 'FillDWord', 'Fillword', 'Flush', 'Frac',\r
+                       'Freemem', 'Getdir', 'Getmem', 'GetMemoryManager',\r
+                       'Halt', 'HexStr', 'Hi', 'High', 'Inc', 'Include',\r
+                       'IndexByte', 'IndexChar', 'IndexDWord', 'IndexWord',\r
+                       'Insert', 'IsMemoryManagerSet', 'Int', 'IOresult',\r
+                       'Length', 'Ln', 'Lo', 'LongJmp', 'Low', 'Lowercase',\r
+                       'Mark', 'Maxavail', 'Memavail', 'Mkdir', 'Move',\r
+                       'MoveChar0', 'New', 'Odd', 'OctStr', 'Ofs', 'Ord',\r
+                       'Paramcount', 'Paramstr', 'Pi', 'Pos', 'Power', 'Pred',\r
+                       'Ptr', 'Random', 'Randomize', 'Read', 'Readln',\r
+                       'Real2Double', 'Release', 'Rename', 'Reset', 'Rewrite',\r
+                       'Rmdir', 'Round', 'Runerror', 'Seek', 'SeekEof',\r
+                       'SeekEoln', 'Seg', 'SetMemoryManager', 'SetJmp',\r
+                       'SetLength', 'SetString', 'SetTextBuf', 'Sin', 'SizeOf',\r
+                       'Sptr', 'Sqr', 'Sqrt', 'SSeg', 'Str', 'StringOfChar',\r
+                       'Succ', 'Swap', 'Trunc', 'Truncate', 'Upcase', 'Val',\r
+                       'Write', 'WriteLn'\r
+               ]\r
+               ,'types' : [\r
+                       'Integer', 'Shortint', 'SmallInt', 'Longint',\r
+                       'Longword', 'Int64', 'Byte', 'Word', 'Cardinal',\r
+                       'QWord', 'Boolean', 'ByteBool', 'LongBool', 'Char',\r
+                       'Real', 'Single', 'Double', 'Extended', 'Comp',\r
+                       'String', 'ShortString', 'AnsiString', 'PChar'\r
+               ]\r
+       }\r
+       ,'OPERATORS' :[\r
+               '@', '*', '+', '-', '/', '^', ':=', '<', '=', '>'\r
+       ]\r
+       ,'DELIMITERS' :[\r
+               '(', ')', '[', ']'\r
+       ]\r
+       ,'STYLES' : {\r
+               'COMMENTS': 'color: #AAAAAA;'\r
+               ,'QUOTESMARKS': 'color: #6381F8;'\r
+               ,'KEYWORDS' : {\r
+                       'specials' : 'color: #EE0000;'\r
+                       ,'constants' : 'color: #654321;'\r
+                       ,'keywords' : 'color: #48BDDF;'\r
+                       ,'functions' : 'color: #449922;'\r
+                       ,'types' : 'color: #2B60FF;'\r
+                       }\r
+               ,'OPERATORS' : 'color: #FF00FF;'\r
+               ,'DELIMITERS' : 'color: #60CA00;'\r
+       }\r
+};\r