Press n or j to go to the next uncovered block, b, p or k for the previous block.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 | 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 2x 369x 369x 369x 369x 369x 369x 2x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x 1x | const {zcl_abapgit_syntax_highlighter} = await import("./zcl_abapgit_syntax_highlighter.clas.mjs"); const {cx_root} = await import("./cx_root.clas.mjs"); // zcl_abapgit_syntax_js.clas.abap class zcl_abapgit_syntax_js extends zcl_abapgit_syntax_highlighter { static INTERNAL_TYPE = 'CLAS'; static INTERNAL_NAME = 'ZCL_ABAPGIT_SYNTAX_JS'; static IMPLEMENTED_INTERFACES = []; static ATTRIBUTES = {"GT_KEYWORDS": {"type": () => {return abap.types.TableFactory.construct(new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JS=>TY_KEYWORD-KEYWORD"}), "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"})}, "zcl_abapgit_syntax_js=>ty_keyword", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["KEYWORD"]},"secondary":[]}, "");}, "visibility": "O", "is_constant": " ", "is_class": "X"}, "GV_COMMENT": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "visibility": "O", "is_constant": " ", "is_class": "X"}, "C_CSS": {"type": () => {return new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "STRING"}), "text": new abap.types.String({qualifiedName: "STRING"}), "comment": new abap.types.String({qualifiedName: "STRING"}), "variables": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "C_TOKEN": {"type": () => {return new abap.types.Structure({ "keyword": new abap.types.Character(1, {}), "text": new abap.types.Character(1, {}), "comment": new abap.types.Character(1, {}), "variables": new abap.types.Character(1, {})}, undefined, undefined, {}, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}, "C_REGEX": {"type": () => {return new abap.types.Structure({ "comment": new abap.types.String({qualifiedName: "STRING"}), "text": new abap.types.String({qualifiedName: "STRING"}), "keyword": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {});}, "visibility": "U", "is_constant": "X", "is_class": "X"}}; static METHODS = {"INIT_KEYWORDS": {"visibility": "O", "parameters": {}}, "INSERT_KEYWORDS": {"visibility": "O", "parameters": {"IV_KEYWORDS": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}, "IV_TOKEN": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"});}, "is_optional": " "}}}, "IS_KEYWORD": {"visibility": "O", "parameters": {"RV_YES": {"type": () => {return new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"});}, "is_optional": " "}, "IV_CHUNK": {"type": () => {return new abap.types.String({qualifiedName: "STRING"});}, "is_optional": " "}}}, "ORDER_MATCHES": {"visibility": "O", "parameters": {}}, "PARSE_LINE": {"visibility": "O", "parameters": {}}, "CLASS_CONSTRUCTOR": {"visibility": "U", "parameters": {}}, "CONSTRUCTOR": {"visibility": "U", "parameters": {}}}; constructor() { const sup = super(); this.me = new abap.types.ABAPObject(); this.me.set(this); this.INTERNAL_ID = abap.internalIdCounter++; this.FRIENDS_ACCESS_INSTANCE = { "SUPER": sup.FRIENDS_ACCESS_INSTANCE, "order_matches": this.order_matches.bind(this), "parse_line": this.parse_line.bind(this), }; this.gt_keywords = zcl_abapgit_syntax_js.gt_keywords; this.gv_comment = zcl_abapgit_syntax_js.gv_comment; this.c_css = zcl_abapgit_syntax_js.c_css; this.c_token = zcl_abapgit_syntax_js.c_token; this.c_regex = zcl_abapgit_syntax_js.c_regex; } async class_constructor() { return zcl_abapgit_syntax_js.class_constructor(); } static async class_constructor() { await this.init_keywords(); } async constructor_(INPUT) { await super.constructor_(); zcl_abapgit_syntax_js.gv_comment.clear(); await this.add_rule({iv_regex: zcl_abapgit_syntax_js.c_regex.get().keyword, iv_token: zcl_abapgit_syntax_js.c_token.get().keyword, iv_style: zcl_abapgit_syntax_js.c_css.get().keyword}); await this.add_rule({iv_regex: zcl_abapgit_syntax_js.c_regex.get().comment, iv_token: zcl_abapgit_syntax_js.c_token.get().comment, iv_style: zcl_abapgit_syntax_js.c_css.get().comment}); await this.add_rule({iv_regex: zcl_abapgit_syntax_js.c_regex.get().text, iv_token: zcl_abapgit_syntax_js.c_token.get().text, iv_style: zcl_abapgit_syntax_js.c_css.get().text}); await this.add_rule({iv_regex: abap.CharacterFactory.get(1, ''), iv_token: zcl_abapgit_syntax_js.c_token.get().variables, iv_style: zcl_abapgit_syntax_js.c_css.get().variables}); return this; } async init_keywords() { return zcl_abapgit_syntax_js.init_keywords(); } static async init_keywords() { let lv_keywords = new abap.types.String({qualifiedName: "STRING"}); zcl_abapgit_syntax_js.gt_keywords.clear(); lv_keywords.set(abap.operators.concat(abap.CharacterFactory.get(109, 'alert|all|body|break|bytetostring|case|continue|default|delete|do|document|else|event|export|for|function|if|'),abap.operators.concat(abap.CharacterFactory.get(109, 'import|in|innerhtml|isnan|item|mimetypes|navigator|new|onabort|onblur|onchange|onclick|ondblclick|ondragdrop|'),abap.operators.concat(abap.CharacterFactory.get(109, 'onerror|onfocus|onkeydown|onkeypress|onkeyup|onload|onmousedown|onmousemove|onmouseout|onmouseover|onmouseup|'),abap.operators.concat(abap.CharacterFactory.get(110, 'onmove|onreset|onselect|onsubmit|onunload|onresize|options|parsefloat|parseint|prototype|return|screen|switch|'),abap.operators.concat(abap.CharacterFactory.get(110, 'unit|var|void|while|window|with|anchor|applet|area|button|checkbox|fileupload|form|frame|hidden|link|mimetype|'),abap.operators.concat(abap.CharacterFactory.get(109, 'password|plugin|radio|reset|select|submit|text|textarea|abs|acos|alert|anchor|asin|atan|atan2|back|big|blink|'),abap.operators.concat(abap.CharacterFactory.get(105, 'blur|bold|captureevents|ceil|charat|charcodeat|clearinterval|cleartimeout|click|close|concat|confirm|cos|'),abap.operators.concat(abap.CharacterFactory.get(104, 'disableexternalcapture|enableexternalcapture|eval|exp|find|fixed|floor|focus|fontcolor|fontsize|forward|'),abap.operators.concat(abap.CharacterFactory.get(107, 'fromcharcode|getdate|getday|getelementbyid|gethours|getminutes|getmonth|getoptionvalue|getoptionvaluecount|'),abap.operators.concat(abap.CharacterFactory.get(111, 'getseconds|getselection|gettime|gettimezoneoffset|getyear|go|handleevent|home|indexof|italics|javaenabled|join|'),abap.operators.concat(abap.CharacterFactory.get(108, 'lastindexof|link|load|log|match|max|min|moveabove|movebelow|moveby|moveto|movetoabsolute|open|parse|plugins|'),abap.operators.concat(abap.CharacterFactory.get(105, 'pop|pow|preference|print|prompt|push|random|refresh|releaseevents|reload|replace|reset|resizeby|resizeto|'),abap.operators.concat(abap.CharacterFactory.get(104, 'reverse|round|routeevent|scroll|scrollby|scrollto|search|select|setdate|sethours|setinterval|setminutes|'),abap.operators.concat(abap.CharacterFactory.get(108, 'setmonth|setseconds|settime|settimeout|setyear|shift|sin|slice|small|sort|splice|split|sqrt|stop|strike|sub|'),abap.operators.concat(abap.CharacterFactory.get(105, 'submit|substr|substring|sup|taintenabled|tan|togmtstring|tolocalestring|tolowercase|tostring|touppercase|'),abap.operators.concat(abap.CharacterFactory.get(110, 'unshift|unwatch|utc|valueof|watch|write|writeln|e|ln10|ln2|log10e|log2e|max_value|min_value|negative_infinity|'),abap.operators.concat(abap.CharacterFactory.get(110, 'nan|pi|positive_infinity|url|above|action|alinkcolor|anchors|appcodename|appname|appversion|applets|arguments|'),abap.operators.concat(abap.CharacterFactory.get(104, 'arity|availheight|availwidth|background|backgroundcolor|below|bgcolor|border|bottom|caller|cancelbubble|'),abap.operators.concat(abap.CharacterFactory.get(106, 'checked|clientheight|clientwidth|clientx|clienty|clip|closed|color|colordepth|complete|constructor|cookie|'),abap.operators.concat(abap.CharacterFactory.get(108, 'count|current|defaultchecked|defaultselected|defaultstatus|defaultvalue|description|display|document|domain|'),abap.operators.concat(abap.CharacterFactory.get(109, 'elements|embeds|enabledplugin|encoding|false|fgcolor|filename|form|formname|forms|frames|hash|height|history|'),abap.operators.concat(abap.CharacterFactory.get(107, 'host|hostname|href|hspace|images|innerheight|innerwidth|language|lastmodified|layers|left|length|linkcolor|'),abap.operators.concat(abap.CharacterFactory.get(111, 'links|location|locationbar|lowsrc|menubar|method|mimetypes|name|next|null|offsetheight|offsetleft|offsetparent|'),abap.operators.concat(abap.CharacterFactory.get(106, 'offsetwidth|opener|outerheight|outerwidth|pagex|pagexoffset|pagey|pageyoffset|parent|parentlayer|pathname|'),abap.operators.concat(abap.CharacterFactory.get(107, 'personalbar|pixeldepth|platform|plugins|port|poswidth|previous|protocol|prototype|referrer|right|scrolltop|'),abap.operators.concat(abap.CharacterFactory.get(110, 'scrollbars|search|selected|selectedindex|self|siblingabove|siblingbelow|src|srcelement|status|statusbar|style|'),abap.operators.concat(abap.CharacterFactory.get(110, 'suffixes|tags|target|text|this|title|toolbar|top|true|type|useragent|value|visibility|vlinkcolor|vspace|width|'),abap.CharacterFactory.get(13, 'window|zindex'))))))))))))))))))))))))))))); await this.insert_keywords({iv_keywords: lv_keywords, iv_token: zcl_abapgit_syntax_js.c_token.get().keyword}); lv_keywords.set(abap.CharacterFactory.get(79, 'array|boolean|date|function|image|layer|math|number|object|option|regexp|string')); await this.insert_keywords({iv_keywords: lv_keywords, iv_token: zcl_abapgit_syntax_js.c_token.get().variables}); } async insert_keywords(INPUT) { return zcl_abapgit_syntax_js.insert_keywords(INPUT); } static async insert_keywords(INPUT) { let iv_keywords = INPUT?.iv_keywords; if (iv_keywords?.getQualifiedName === undefined || iv_keywords.getQualifiedName() !== "STRING") { iv_keywords = undefined; } if (iv_keywords === undefined) { iv_keywords = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_keywords); } let iv_token = INPUT?.iv_token; if (iv_token?.getQualifiedName === undefined || iv_token.getQualifiedName() !== "ZCL_ABAPGIT_SYNTAX_JS=>TY_TOKEN") { iv_token = undefined; } if (iv_token === undefined) { iv_token = new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"}).set(INPUT.iv_token); } let lt_keywords = abap.types.TableFactory.construct(new abap.types.String({qualifiedName: "STRING"}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, ""); let ls_keyword = new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JS=>TY_KEYWORD-KEYWORD"}), "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"})}, "zcl_abapgit_syntax_js=>ty_keyword", undefined, {}, {}); let fs_lv_keyword_ = new abap.types.FieldSymbol(new abap.types.Character(4)); abap.statements.split({source: iv_keywords, at: abap.CharacterFactory.get(1, '|'), table: lt_keywords}); for await (const unique655 of abap.statements.loop(lt_keywords)) { fs_lv_keyword_.assign(unique655); ls_keyword.clear(); ls_keyword.get().keyword.set(fs_lv_keyword_); ls_keyword.get().token.set(iv_token); abap.statements.insertInternal({data: ls_keyword, table: zcl_abapgit_syntax_js.gt_keywords}); } } async is_keyword(INPUT) { return zcl_abapgit_syntax_js.is_keyword(INPUT); } static async is_keyword(INPUT) { let rv_yes = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); let iv_chunk = INPUT?.iv_chunk; if (iv_chunk?.getQualifiedName === undefined || iv_chunk.getQualifiedName() !== "STRING") { iv_chunk = undefined; } if (iv_chunk === undefined) { iv_chunk = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_chunk); } let lv_str = new abap.types.String({qualifiedName: "STRING"}); lv_str.set(abap.builtin.to_lower({val: iv_chunk})); abap.statements.readTable(zcl_abapgit_syntax_js.gt_keywords,{withTableKey: true, withKey: (i) => {return abap.compare.eq(i.keyword, lv_str);}, withKeyValue: [{key: (i) => {return i.keyword}, value: lv_str}], usesTableLine: false, withKeySimple: {"keyword": lv_str}}); rv_yes.set(abap.builtin.boolc(abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0)))); return rv_yes; } async order_matches(INPUT) { let iv_line = INPUT?.iv_line; if (iv_line?.getQualifiedName === undefined || iv_line.getQualifiedName() !== "STRING") { iv_line = undefined; } if (iv_line === undefined) { iv_line = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_line); } let ct_matches = abap.types.TableFactory.construct(new abap.types.Structure({ "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_highlighter=>ty_match-token"}), "offset": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-OFFSET"}), "length": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-LENGTH"}), "text_tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-TEXT_TAG"})}, "zcl_abapgit_syntax_highlighter=>ty_match", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_syntax_highlighter=>ty_match_tt"); if (INPUT && INPUT.ct_matches) {ct_matches = INPUT.ct_matches;} let lv_match = new abap.types.String({qualifiedName: "STRING"}); let lv_line_len = new abap.types.Integer({qualifiedName: "I"}); let lv_cmmt_end = new abap.types.Integer({qualifiedName: "I"}); let lv_prev_end = new abap.types.Integer({qualifiedName: "I"}); let lv_prev_token = new abap.types.Character(1, {}); let fs_ls_prev_ = new abap.types.FieldSymbol(new abap.types.Structure({ "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_highlighter=>ty_match-token"}), "offset": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-OFFSET"}), "length": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-LENGTH"}), "text_tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-TEXT_TAG"})}, "zcl_abapgit_syntax_highlighter=>ty_match", undefined, {}, {})); let fs_ls_match_ = new abap.types.FieldSymbol(new abap.types.Structure({ "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_highlighter=>ty_match-token"}), "offset": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-OFFSET"}), "length": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-LENGTH"}), "text_tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-TEXT_TAG"})}, "zcl_abapgit_syntax_highlighter=>ty_match", undefined, {}, {})); let fs_ls_keyword_ = new abap.types.FieldSymbol(new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JS=>TY_KEYWORD-KEYWORD"}), "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"})}, "zcl_abapgit_syntax_js=>ty_keyword", undefined, {}, {})); abap.statements.sort(ct_matches,{by: [{component: "offset"},{component: "length", descending: true}]}); lv_line_len.set(abap.builtin.strlen({val: iv_line})); if (abap.compare.eq(zcl_abapgit_syntax_js.gv_comment, abap.builtin.abap_true)) { abap.statements.readTable(ct_matches,{withKey: (i) => {return abap.compare.eq(i.token, zcl_abapgit_syntax_js.c_token.get().comment);}, withKeyValue: [{key: (i) => {return i.token}, value: zcl_abapgit_syntax_js.c_token.get().comment}], usesTableLine: false, withKeySimple: {"token": zcl_abapgit_syntax_js.c_token.get().comment}}); if (abap.compare.ne(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { ct_matches.clear(); fs_ls_match_.assign(ct_matches.appendInitial()); fs_ls_match_.get().token.set(zcl_abapgit_syntax_js.c_token.get().comment); fs_ls_match_.get().offset.set(abap.IntegerFactory.get(0)); fs_ls_match_.get().length.set(lv_line_len); return; } } for await (const unique656 of abap.statements.loop(ct_matches)) { fs_ls_match_.assign(unique656); if (abap.compare.eq(lv_prev_token, zcl_abapgit_syntax_js.c_token.get().text) && abap.compare.ne(fs_ls_match_.get().token, zcl_abapgit_syntax_js.c_token.get().text)) { fs_ls_match_.get().token.clear(); continue; } lv_match.set(abap.builtin.substring({val: iv_line, off: fs_ls_match_.get().offset, len: fs_ls_match_.get().length})); let unique657 = fs_ls_match_.get().token; if (abap.compare.eq(unique657, zcl_abapgit_syntax_js.c_token.get().keyword)) { if (abap.compare.lt(fs_ls_match_.get().offset, lv_prev_end)) { fs_ls_match_.get().token.clear(); continue; } lv_match.set(abap.builtin.to_lower({val: lv_match})); abap.statements.readTable(zcl_abapgit_syntax_js.gt_keywords,{withTableKey: true, assigning: fs_ls_keyword_, withKey: (i) => {return abap.compare.eq(i.keyword, lv_match);}, withKeyValue: [{key: (i) => {return i.keyword}, value: lv_match}], usesTableLine: false, withKeySimple: {"keyword": lv_match}}); if (abap.compare.eq(abap.builtin.sy.get().subrc, abap.IntegerFactory.get(0))) { fs_ls_match_.get().token.set(fs_ls_keyword_.get().token); } } else if (abap.compare.eq(unique657, zcl_abapgit_syntax_js.c_token.get().comment)) { if (abap.compare.eq(lv_match, abap.CharacterFactory.get(2, '/*'))) { await abap.statements.deleteInternal(ct_matches,{where: async (I) => {return abap.compare.gt(I.offset, fs_ls_match_.get().offset);}}); fs_ls_match_.get().length.set(abap.operators.minus(lv_line_len,fs_ls_match_.get().offset)); zcl_abapgit_syntax_js.gv_comment.set(abap.builtin.abap_true); } else if (abap.compare.eq(lv_match, abap.CharacterFactory.get(2, '//'))) { await abap.statements.deleteInternal(ct_matches,{where: async (I) => {return abap.compare.gt(I.offset, fs_ls_match_.get().offset);}}); fs_ls_match_.get().length.set(abap.operators.minus(lv_line_len,fs_ls_match_.get().offset)); } else if (abap.compare.eq(lv_match, abap.CharacterFactory.get(2, '*/'))) { await abap.statements.deleteInternal(ct_matches,{where: async (I) => {return abap.compare.lt(I.offset, fs_ls_match_.get().offset);}}); fs_ls_match_.get().length.set(abap.operators.add(fs_ls_match_.get().offset,abap.IntegerFactory.get(2))); fs_ls_match_.get().offset.set(abap.IntegerFactory.get(0)); zcl_abapgit_syntax_js.gv_comment.set(abap.builtin.abap_false); } else { lv_cmmt_end.set(abap.operators.add(fs_ls_match_.get().offset,fs_ls_match_.get().length)); await abap.statements.deleteInternal(ct_matches,{where: async (I) => {return abap.compare.gt(I.offset, fs_ls_match_.get().offset) && abap.compare.le(I.offset, lv_cmmt_end);}}); } } else if (abap.compare.eq(unique657, zcl_abapgit_syntax_js.c_token.get().text)) { fs_ls_match_.get().text_tag.set(lv_match); if (abap.compare.eq(lv_prev_token, zcl_abapgit_syntax_js.c_token.get().text)) { if (abap.compare.eq(fs_ls_match_.get().text_tag, fs_ls_prev_.get().text_tag)) { fs_ls_prev_.get().length.set(abap.operators.minus(abap.operators.add(fs_ls_match_.get().offset,fs_ls_match_.get().length),fs_ls_prev_.get().offset)); lv_prev_token.clear(); } fs_ls_match_.get().token.clear(); continue; } } lv_prev_token.set(fs_ls_match_.get().token); lv_prev_end.set(abap.operators.add(fs_ls_match_.get().offset,fs_ls_match_.get().length)); abap.statements.assign({target: fs_ls_prev_, source: fs_ls_match_}); } await abap.statements.deleteInternal(ct_matches,{where: async (I) => {return abap.compare.initial(I.token);}}); } async parse_line(INPUT) { let rt_matches = abap.types.TableFactory.construct(new abap.types.Structure({ "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_highlighter=>ty_match-token"}), "offset": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-OFFSET"}), "length": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-LENGTH"}), "text_tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-TEXT_TAG"})}, "zcl_abapgit_syntax_highlighter=>ty_match", undefined, {}, {}), {"withHeader":false,"keyType":"DEFAULT","primaryKey":{"name":"primary_key","type":"STANDARD","isUnique":false,"keyFields":[]},"secondary":[]}, "zcl_abapgit_syntax_highlighter=>ty_match_tt"); let iv_line = INPUT?.iv_line; if (iv_line?.getQualifiedName === undefined || iv_line.getQualifiedName() !== "STRING") { iv_line = undefined; } if (iv_line === undefined) { iv_line = new abap.types.String({qualifiedName: "STRING"}).set(INPUT.iv_line); } let lv_index = new abap.types.Integer({qualifiedName: "I"}); let fs_ls_match_ = new abap.types.FieldSymbol(new abap.types.Structure({ "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_highlighter=>ty_match-token"}), "offset": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-OFFSET"}), "length": new abap.types.Integer({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-LENGTH"}), "text_tag": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_HIGHLIGHTER=>TY_MATCH-TEXT_TAG"})}, "zcl_abapgit_syntax_highlighter=>ty_match", undefined, {}, {})); rt_matches.set((await super.parse_line({iv_line: iv_line}))); for await (const unique658 of abap.statements.loop(rt_matches,{where: async (I) => {return abap.compare.eq(I.token, zcl_abapgit_syntax_js.c_token.get().keyword);},topEquals: {"token": zcl_abapgit_syntax_js.c_token.get().keyword}})) { fs_ls_match_.assign(unique658); lv_index.set(abap.builtin.sy.get().tabix); if (abap.compare.eq(abap.builtin.abap_false, (await this.is_keyword({iv_chunk: abap.builtin.substring({val: iv_line, off: fs_ls_match_.get().offset, len: fs_ls_match_.get().length})})))) { fs_ls_match_.get().token.clear(); } } await abap.statements.deleteInternal(rt_matches,{where: async (I) => {return abap.compare.initial(I.token);}}); return rt_matches; } } abap.Classes['ZCL_ABAPGIT_SYNTAX_JS'] = zcl_abapgit_syntax_js; zcl_abapgit_syntax_js.gt_keywords = abap.types.TableFactory.construct(new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JS=>TY_KEYWORD-KEYWORD"}), "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"})}, "zcl_abapgit_syntax_js=>ty_keyword", undefined, {}, {}), {"withHeader":false,"keyType":"USER","primaryKey":{"name":"primary_key","type":"HASHED","isUnique":true,"keyFields":["KEYWORD"]},"secondary":[]}, ""); zcl_abapgit_syntax_js.gv_comment = new abap.types.Character(1, {"qualifiedName":"ABAP_BOOL","ddicName":"ABAP_BOOL"}); zcl_abapgit_syntax_js.c_css = new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "STRING"}), "text": new abap.types.String({qualifiedName: "STRING"}), "comment": new abap.types.String({qualifiedName: "STRING"}), "variables": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {}); zcl_abapgit_syntax_js.c_css.get().keyword.set('keyword'); zcl_abapgit_syntax_js.c_css.get().text.set('text'); zcl_abapgit_syntax_js.c_css.get().comment.set('comment'); zcl_abapgit_syntax_js.c_css.get().variables.set('variables'); zcl_abapgit_syntax_js.c_token = new abap.types.Structure({ "keyword": new abap.types.Character(1, {}), "text": new abap.types.Character(1, {}), "comment": new abap.types.Character(1, {}), "variables": new abap.types.Character(1, {})}, undefined, undefined, {}, {}); zcl_abapgit_syntax_js.c_token.get().keyword.set('K'); zcl_abapgit_syntax_js.c_token.get().text.set('T'); zcl_abapgit_syntax_js.c_token.get().comment.set('C'); zcl_abapgit_syntax_js.c_token.get().variables.set('V'); zcl_abapgit_syntax_js.c_regex = new abap.types.Structure({ "comment": new abap.types.String({qualifiedName: "STRING"}), "text": new abap.types.String({qualifiedName: "STRING"}), "keyword": new abap.types.String({qualifiedName: "STRING"})}, undefined, undefined, {}, {}); zcl_abapgit_syntax_js.c_regex.get().comment.set('\\/\\*.*\\*\\/|\\/\\*|\\*\\/|\\/\\/'); zcl_abapgit_syntax_js.c_regex.get().text.set('"|\'|`'); zcl_abapgit_syntax_js.c_regex.get().keyword.set('\\b[a-z-]+\\b'); await abap.Classes['ZCL_ABAPGIT_SYNTAX_JS'].class_constructor(); zcl_abapgit_syntax_js.ty_token = new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"}); zcl_abapgit_syntax_js.ty_keyword = new abap.types.Structure({ "keyword": new abap.types.String({qualifiedName: "ZCL_ABAPGIT_SYNTAX_JS=>TY_KEYWORD-KEYWORD"}), "token": new abap.types.Character(1, {"qualifiedName":"zcl_abapgit_syntax_js=>ty_token"})}, "zcl_abapgit_syntax_js=>ty_keyword", undefined, {}, {}); export {zcl_abapgit_syntax_js}; |