• Skip to sidebar navigation
  • Skip to content

Bitbucket

  • More
    ProjectsRepositories
    • Help
      • Online help
      • Learn Git
      • Welcome to Bitbucket
      • Keyboard shortcuts
    • Log In
    Blackrock
    1. Blackrock

    main

    Public
    Actions
    • Clone

    Learn more about cloning repositories

    You have read-only access

    Navigation
    • Source
    • Commits
    • Branches
    • All Branches Graph
    • Graphs
    • Forks
    1. Blackrock
    2. main

    Source

    main/wp-content/plugins/wp-file-manager/lib/codemirror/mode/d/d.js
    Артем ШиряевАртем Ширяев committed 554847ddcb906 Apr 2021
    Raw file
    Source viewDiff to previous
          else if (((ctx.type == "}" || ctx.type == "top") && curPunc != ';') || (ctx.type == "statement" && curPunc == "newstatement"))
     
    1
    // CodeMirror, copyright (c) by Marijn Haverbeke and others
    2
    // Distributed under an MIT license: http://codemirror.net/LICENSE
    3
    ​
    4
    (function(mod) {
    5
      if (typeof exports == "object" && typeof module == "object") // CommonJS
    6
        mod(require("../../lib/codemirror"));
    7
      else if (typeof define == "function" && define.amd) // AMD
    8
        define(["../../lib/codemirror"], mod);
    9
      else // Plain browser env
    10
        mod(CodeMirror);
    11
    })(function(CodeMirror) {
    12
    "use strict";
    13
    ​
    14
    CodeMirror.defineMode("d", function(config, parserConfig) {
    15
      var indentUnit = config.indentUnit,
    16
          statementIndentUnit = parserConfig.statementIndentUnit || indentUnit,
    17
          keywords = parserConfig.keywords || {},
    18
          builtin = parserConfig.builtin || {},
    19
          blockKeywords = parserConfig.blockKeywords || {},
    20
          atoms = parserConfig.atoms || {},
    21
          hooks = parserConfig.hooks || {},
    22
          multiLineStrings = parserConfig.multiLineStrings;
    23
      var isOperatorChar = /[+\-*&%=<>!?|\/]/;
    24
    ​
    25
      var curPunc;
    26
    ​
    27
      function tokenBase(stream, state) {
    28
        var ch = stream.next();
    29
        if (hooks[ch]) {
    30
          var result = hooks[ch](stream, state);
    31
          if (result !== false) return result;
    32
        }
    33
        if (ch == '"' || ch == "'" || ch == "`") {
    34
          state.tokenize = tokenString(ch);
    35
          return state.tokenize(stream, state);
    36
        }
    37
        if (/[\[\]{}\(\),;\:\.]/.test(ch)) {
    38
          curPunc = ch;
    39
          return null;
    40
        }
    41
        if (/\d/.test(ch)) {
    42
          stream.eatWhile(/[\w\.]/);
    43
          return "number";
    44
        }
    45
        if (ch == "/") {
    46
          if (stream.eat("+")) {
    47
            state.tokenize = tokenComment;
    48
            return tokenNestedComment(stream, state);
    49
          }
    50
          if (stream.eat("*")) {
    51
            state.tokenize = tokenComment;
    52
            return tokenComment(stream, state);
    53
          }
    54
          if (stream.eat("/")) {
    55
            stream.skipToEnd();
    56
            return "comment";
    57
          }
    58
        }
    59
        if (isOperatorChar.test(ch)) {
    60
          stream.eatWhile(isOperatorChar);
    61
          return "operator";
    62
        }
    63
        stream.eatWhile(/[\w\$_\xa1-\uffff]/);
    • Git repository management for enterprise teams powered by Atlassian Bitbucket
    • Atlassian Bitbucket v5.10.1
    • Documentation
    • Contact Support
    • Request a feature
    • About
    • Contact Atlassian
    Atlassian

    Everything looks good. Well let you know here if theres anything you should know about.