Changeset View
Changeset View
Standalone View
Standalone View
src/script/data/indentation/ada.js
Context not available. | |||||
49 | // TODO: 'protected', 'task', 'select' & | 49 | // TODO: 'protected', 'task', 'select' & | ||
---|---|---|---|---|---|
50 | // possibly other keywords not recognised | 50 | // possibly other keywords not recognised | ||
51 | 51 | | |||
52 | "use strict"; | | |||
53 | | ||||
54 | // required katepart js libraries | 52 | // required katepart js libraries | ||
55 | require ("range.js"); | 53 | require ("range.js"); | ||
56 | require ("cursor.js"); | 54 | require ("cursor.js"); | ||
Context not available. | |||||
64 | 62 | | |||
65 | //END USER CONFIGURATION | 63 | //END USER CONFIGURATION | ||
66 | 64 | | |||
67 | const AdaComment = /\s*--.*$/; | 65 | var AdaComment = /\s*--.*$/; | ||
68 | const unfStmt = /([.=\(]|:=[^;]*)\s*$/; | 66 | var unfStmt = /([.=\(]|:=[^;]*)\s*$/; | ||
69 | const unfLoop = /^\s*(for|while)\b(?!.*\bloop\b)/i; | 67 | var unfLoop = /^\s*(for|while)\b(?!.*\bloop\b)/i; | ||
70 | const AdaBlockStart = /^\s*(if\b|while\b|else\b|elsif\b|loop\b|for\b.*\b(loop|use)\b|declare\b|begin\b|type\b.*\bis\b[^;]*$|(type\b.*)?\brecord\b|procedure\b|function\b|with\s+function\b|accept\b|do\b|task\b|generic\b|package\b|private\b|then\b|when\b|is\b)/i; | 68 | var AdaBlockStart = /^\s*(if\b|while\b|else\b|elsif\b|loop\b|for\b.*\b(loop|use)\b|declare\b|begin\b|type\b.*\bis\b[^;]*$|(type\b.*)?\brecord\b|procedure\b|function\b|with\s+function\b|accept\b|do\b|task\b|generic\b|package\b|private\b|then\b|when\b|is\b)/i; | ||
71 | const StatementStart = /^\s*(if|when|while|else|elsif|loop|for\b.*\b(loop|use)|begin)\b/i; | 69 | var StatementStart = /^\s*(if|when|while|else|elsif|loop|for\b.*\b(loop|use)|begin)\b/i; | ||
72 | 70 | | |||
73 | function dbg() { | 71 | function dbg() { | ||
74 | if (debugMode) { | 72 | if (debugMode) { | ||
Context not available. | |||||
85 | 83 | | |||
86 | 84 | | |||
87 | // regexp of keywords & patterns that cause reindenting of the current line. | 85 | // regexp of keywords & patterns that cause reindenting of the current line. | ||
88 | const AdaReIndent = /^\s*((then|end|elsif|when|exception|begin|is|record|private)\s+|<<\w+>>|end;|[#\)])(.*)$/; | 86 | var AdaReIndent = /^\s*((then|end|elsif|when|exception|begin|is|record|private)\s+|<<\w+>>|end;|[#\)])(.*)$/; | ||
89 | 87 | | |||
90 | // characters which trigger indent, beside the default '\n' | 88 | // characters which trigger indent, beside the default '\n' | ||
91 | var triggerCharacters = " \t)#>;"; | 89 | var triggerCharacters = " \t)#>;"; | ||
Context not available. |