{ "name": "ABAP", "scopeName": "source.abap", "patterns": [ { "name": "comment.line.full.abap", "match": "^\\*.*\\n?", "captures": { "1": { "name": "punctuation.definition.comment.abap" } } }, { "name": "comment.line.partial.abap", "match": "\".*\\n?", "captures": { "1": { "name": "punctuation.definition.comment.abap" } } }, { "name": "comment.line.pragma.abap", "match": "(?\u003c![^\\s])##.*?(?=([\\.:,\\s]))" }, { "name": "constant.numeric.abap", "match": "\\b[0-9]+(\\b|\\.|,)" }, { "name": "string.interpolated.abap", "begin": "(?\u003c!\\\\)(\\|)(.*?)", "end": "(?\u003c!\\\\)(\\|)", "patterns": [ { "name": "constant.character.escape", "match": "({ )|( })" }, { "name": "variable.other.abap", "match": "(?\u003c={ ).*?(?= })" }, { "name": "constant.character.escape.abap", "match": "\\\\\\|" } ], "beginCaptures": { "1": { "name": "constant.character.escape.abap" } }, "endCaptures": { "1": { "name": "constant.character.escape.abap" } } }, { "name": "string.quoted.single.abap", "begin": "'", "end": "'", "patterns": [ { "name": "constant.character.escape.abap", "match": "''" } ] }, { "name": "string.quoted.single.abap", "begin": "`", "end": "`", "patterns": [ { "name": "constant.character.escape.abap", "match": "``" } ] }, { "name": "meta.block.begin.implementation.abap", "begin": "(?i)^\\s*(class|method|form)\\s([a-z_][a-z_0-9]*)", "end": "\\s*\\.\\s*\\n?", "patterns": [ { "name": "storage.modifier.class.abap", "match": "(?ix)(^|\\s+)(definition|implementation|public|inheriting\\s+from|final|deferred|abstract|shared\\s+memory\\s+enabled|(global|local)*\\s*friends|(create\\s+(public|protected|private))|for\\s+testing|risk\\s+level\\s+(critical|dangerous|harmless))|duration\\s(short|medium|long)(?=\\s+|\\.)" }, { "contentName": "entity.name.type.block.abap", "begin": "(?=[A-Za-z_][A-Za-z0-9_]*)", "end": "(?![A-Za-z0-9_])", "patterns": [ { "include": "#generic_names" } ] } ], "beginCaptures": { "1": { "name": "storage.type.block.abap" }, "2": { "name": "entity.name.type.block.abap" } } }, { "name": "storage.type.block.end.abap", "match": "(?i)(endclass|endmethod|endform)" }, { "name": "variable.other.field.symbol.abap", "match": "(?i)(\u003c[A-Za-z_][A-Za-z0-9_]*\u003e)" }, { "include": "#keywords" }, { "include": "#abap_constants" }, { "include": "#operators" }, { "include": "#abaptypes" }, { "include": "#system_fields" } ], "repository": { "abap_constants": { "name": "constant.language.abap", "match": "(?ix)(?\u003c=\\s)(initial|null|space|abap_true|abap_false|table_line)(?=\\s|\\.|,)" }, "abaptypes": { "name": "support.type.abap", "match": "(?ix)\\s(abap_bool|string|xstring|any|clike|csequence|numeric|xsequence|c|n|i|p|f|d|t|x)(?=\\s|\\.|,)" }, "arithmetic_operator": { "name": "keyword.operator.arithmetic.abap", "match": "(?\u003c=\\s)(\\+|\\-|\\*|\\*\\*|/|%)(?=\\s)" }, "comparison_operator": { "name": "keyword.operator.comparison.abap", "match": "(?i)(?\u003c=\\s)(\u003c|\u003e|\u003c\\=|\u003e\\=|\\=|\u003c\u003e|eq|ne|lt|le|gt|ge|cs|cp)(?=\\s)" }, "control_keywords": { "name": "keyword.control.flow.abap", "match": "(?ix)(^|\\s)(\n\t at|case|catch|continue|do|elseif|else|endat|endcase|enddo|endif|\n\t endloop|endon|if|loop|on|raise|try\n\t\t\t )(?=\\s|\\.|:)" }, "generic_names": { "match": "[A-Za-z_][A-Za-z0-9_]*" }, "keywords": { "patterns": [ { "include": "#main_keywords" }, { "include": "#control_keywords" }, { "include": "#keywords_followed_by_braces" } ] }, "keywords_followed_by_braces": { "name": "keyword.control.simple.abap", "match": "(?ix)\\b(data|value|field-symbol)(?=\\()" }, "logical_operator": { "name": "keyword.operator.arithmetic.abap", "match": "(?i)(?\u003c=\\s)(not|or|and)(?=\\s)" }, "main_keywords": { "name": "keyword.control.simple.abap", "match": "(?ix)(?\u003c=^|\\s)(\n\t abstract|add|add-corresponding|adjacent|alias|aliases|all|append|appending|ascending|as|assert|assign|assigned|assigning|authority-check|\n\t back|begin|binary|bound|break-point|by|byte|\n\t call|cast|changing|check|class-data|class-method|class-methods|clear|close|cnt|collect|commit|character|\n\t corresponding|communication|component|compute|concatenate|condense|constants|conv|count|\n\t controls|convert|create|currency|\n\t data|descending|default|define|deferred|delete|describe|detail|display|divide|divide-corresponding|display-mode|duplicates|\n\t deleting|\n\t editor-call|end|endexec|endfunction|ending|endinterface|endmodule|end-of-definition|end-of-page|end-of-selection|end-test-injection|end-test-seam|\n\t endprovide|endselect|endtry|endwhile|enum|event|events|exec|exit|export|\n\t exporting|extract|exception|exceptions|\n\t field-symbols|field-groups|first|fetch|fields|format|free|from|function|find|for|function-pool|\n\t generate|get|\n\t handle|hide|\n\t import|importing|index|infotypes|initial|initialization|\n\t id|is|in|interface|interfaces|input|insert|into|\n\t\t\tkey|\n\t left-justified|leave|like|line|line-count|line-size|load|local|length|left|leading|lower|\n\t method|message|message-id|methods|modify|module|move|move-corresponding|multiply|multiply-corresponding|match|\n\t\t\tnew|new-line|new-page|new-section|no|no-gap|no-sign|no-zero|non-unique|number|\n\t occurrence|object|obligatory|of|overlay|optional|others|occurrences|occurs|offset|\n\t pack|parameters|perform|places|position|print-control|private|program|protected|provide|public|put|\n\t radiobutton|raising|ranges|receive|receiving|redefinition|reference|refresh|regex|reject|results|requested|\n\t ref|replace|report|reserve|restore|return|returning|right-justified|rollback|read|read-only|rp-provide-from-last|\n\t scan|screen|scroll|search|select|select-options|selection-screen|\n\t separated|set|shift|single|skip|sort|sorted|split|standard|starting|start-of-selection|sum|subtract-corresponding|statics|step|stop|structure|submatches|submit|subtract|summary|supplied|suppress|section|syntax-check|syntax-trace|system-call|\n\t tables|table|testing|test-seam|test-injection|then|times|titlebar|to|top-of-page|trailing|transfer|transformation|translate|transporting|types|type|type-pool|type-pools|\n\t unassign|unique|uline|unpack|update|upper|using|\n\t value|\n\t when|while|window|write|where|with|work\n\t\t\t )(?=\\s|\\.|:)" }, "math_operators": { "name": "keyword.operator.math.abap", "match": "(?ix)\\s(abs|sign|ceil|floor|trunc|frac|acos|asin|\n\t atan|cos|sin|tan|cosh|sinh|tanh|exp|log|log10|sqrt)\\(" }, "operators": { "patterns": [ { "include": "#other_operator" }, { "include": "#math_operators" }, { "include": "#string_operators" }, { "include": "#arithmetic_operator" }, { "include": "#comparison_operator" }, { "include": "#logical_operator" } ] }, "other_operator": { "name": "keyword.operator.other.abap", "match": "\\s(\u0026\u0026|\\?\\=)\\s" }, "string_operators": { "name": "keyword.operator.string.abap", "match": "(?ix)\\s(strlen|xstrlen|charlen|lines|numofchar|dbmaxlen)\\(" }, "system_fields": { "name": "variable.language.abap", "match": "(?ix)\\b(sy-)(abcde|batch|binpt|calld|callr|colno|cpage|cprog|cucol|curow|datar|datlo|datum|dayst|dbcnt|dbnam|dbsysc|dyngr|dynnr|fdayw|fdpos|host|index|langu|ldbpg|lilli|linct|linno|linsz|lisel|listi|loopc|lsind|macol|mandt|marow|modno|msgid|msgno|msgty|msgv[1-4]|opsysc|pagno|pfkey|repid|saprl|scols|slset|spono|srows|staco|staro|stepl|subrc|sysid|tabix|tcode|tfill|timlo|title|tleng|tvar[0-9]|tzone|ucomm|uline|uname|uzeit|vline|wtitl|zonlo)(?=\\.|\\s)" } } }